Class SyntheticFunctionName

java.lang.Object
de.inetsoftware.jwebassembly.module.FunctionName
de.inetsoftware.jwebassembly.module.SyntheticFunctionName
Direct Known Subclasses:
ArraySyntheticFunctionName, ImportSyntheticFunctionName

public abstract class SyntheticFunctionName extends FunctionName
Synthetic/dynamic method.
  • Constructor Details

    • SyntheticFunctionName

      public SyntheticFunctionName(String className, String name, String signature)
      Create a new instance.
      Parameters:
      className - the Java class name
      name - the function name
      signature - the method signature, first the parameters, then null and the the return types
  • Method Details

    • hasWasmCode

      protected abstract boolean hasWasmCode()
      If this function has WASM code or if this function is a import with JavaScript code.
      Returns:
      true, if WASM code
    • getCodeBuilder

      protected WasmCodeBuilder getCodeBuilder(WatParser watParser)
      Get the WasmCodeBuilder for the synthetic WASM code.
      Parameters:
      watParser - a helping WatParser
      Returns:
      the code
    • getAnnotation

      protected Function<String,Object> getAnnotation()
      Get the synthetic annotation of a import function.
      Returns:
      the annotation
    • istStatic

      protected boolean istStatic()
      Is a static method or if it need a this parameter.
      Returns:
      true, id static