Class WatCodeSyntheticFunctionName
- java.lang.Object
-
- de.inetsoftware.jwebassembly.module.FunctionName
-
- de.inetsoftware.jwebassembly.module.SyntheticFunctionName
-
- de.inetsoftware.jwebassembly.module.ArraySyntheticFunctionName
-
- de.inetsoftware.jwebassembly.module.WatCodeSyntheticFunctionName
-
- Direct Known Subclasses:
MultiArrayFunctionName
class WatCodeSyntheticFunctionName extends ArraySyntheticFunctionName
Synthetic/dynamic method based on WAT code (WASM in text form).
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
code
-
Fields inherited from class de.inetsoftware.jwebassembly.module.FunctionName
className, fullName, methodName, signature, signatureName
-
-
Constructor Summary
Constructors Constructor Description WatCodeSyntheticFunctionName(java.lang.String name, java.lang.String code, AnyType... signatureTypes)
Create a new instance.WatCodeSyntheticFunctionName(java.lang.String className, java.lang.String name, java.lang.String signature, java.lang.String code, AnyType... signatureTypes)
Create a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.String
getCode()
Get Wat code, can be overridden.protected WasmCodeBuilder
getCodeBuilder(WatParser watParser)
Get the WasmCodeBuilder for the synthetic WASM code.protected boolean
hasWasmCode()
If this function has WASM code or if this function is a import with JavaScript code.-
Methods inherited from class de.inetsoftware.jwebassembly.module.ArraySyntheticFunctionName
getSignature
-
Methods inherited from class de.inetsoftware.jwebassembly.module.SyntheticFunctionName
getAnnotation, istStatic
-
Methods inherited from class de.inetsoftware.jwebassembly.module.FunctionName
equals, hashCode
-
-
-
-
Constructor Detail
-
WatCodeSyntheticFunctionName
public WatCodeSyntheticFunctionName(java.lang.String name, java.lang.String code, AnyType... signatureTypes)
Create a new instance.- Parameters:
name
- the function namecode
- the WAT code (WASM in text form)signatureTypes
- the method signature, first the parameters, then null and the the return types
-
WatCodeSyntheticFunctionName
public WatCodeSyntheticFunctionName(java.lang.String className, java.lang.String name, java.lang.String signature, @Nonnull java.lang.String code, AnyType... signatureTypes)
Create a new instance.- Parameters:
className
- the Java class namename
- the function namecode
- the WAT code (WASM in text form)signature
- the string signaturesignatureTypes
- the method signature, first the parameters, then null and the the return types
-
-
Method Detail
-
getCode
@Nonnull protected java.lang.String getCode()
Get Wat code, can be overridden.- Returns:
- the code
-
hasWasmCode
protected boolean hasWasmCode()
If this function has WASM code or if this function is a import with JavaScript code.- Specified by:
hasWasmCode
in classSyntheticFunctionName
- Returns:
- true, if WASM code
-
getCodeBuilder
protected WasmCodeBuilder getCodeBuilder(WatParser watParser)
Get the WasmCodeBuilder for the synthetic WASM code.- Overrides:
getCodeBuilder
in classSyntheticFunctionName
- Parameters:
watParser
- a helping WatParser- Returns:
- the code
-
-