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
Synthetic/dynamic method based on WAT code (WASM in text form).
-
Field Summary
FieldsFields inherited from class de.inetsoftware.jwebassembly.module.FunctionName
className, fullName, methodName, signature, signatureName
-
Constructor Summary
ConstructorsConstructorDescriptionWatCodeSyntheticFunctionName
(String name, String code, AnyType... signatureTypes) Create a new instance.WatCodeSyntheticFunctionName
(String className, String name, String signature, String code, AnyType... signatureTypes) Create a new instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected String
getCode()
Get Wat code, can be overridden.protected WasmCodeBuilder
getCodeBuilder
(WatParser watParser) Get the WasmCodeBuilder for the synthetic WASM code.protected boolean
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
-
Field Details
-
code
-
-
Constructor Details
-
WatCodeSyntheticFunctionName
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(String className, String name, String signature, @Nonnull String code, AnyType... signatureTypes) Create a new instance.- Parameters:
className
- the Java class namename
- the function namesignature
- the string signaturecode
- the WAT code (WASM in text form)signatureTypes
- the method signature, first the parameters, then null and the the return types
-
-
Method Details
-
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
Get the WasmCodeBuilder for the synthetic WASM code.- Overrides:
getCodeBuilder
in classSyntheticFunctionName
- Parameters:
watParser
- a helping WatParser- Returns:
- the code
-