Class FunctionType
- java.lang.Object
-
- de.mirkosertic.bytecoder.core.backend.wasm.ast.FunctionType
-
- All Implemented Interfaces:
ReferencableType,WasmType
public class FunctionType extends java.lang.Object implements ReferencableType
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<WasmType>parameterprivate WasmTyperesultTypeprivate TypesSectiontypesSection
-
Constructor Summary
Constructors Constructor Description FunctionType(TypesSection section, WasmType resultType)FunctionType(TypesSection section, java.util.List<WasmType> parameter)FunctionType(TypesSection section, java.util.List<WasmType> parameter, WasmType resultType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<WasmType>getParameter()WasmTypegetResultType()intindex()booleanisVoid()booleanmatches(WasmType otherResultType)booleanmatches(java.util.List<WasmType> otherParameter)booleanmatches(java.util.List<WasmType> otherParameter, WasmType otherResultType)voidwriteRefTo(TextWriter writer)voidwriteTo(BinaryWriter.Writer writer)voidwriteTo(TextWriter writer)
-
-
-
Field Detail
-
typesSection
private final TypesSection typesSection
-
parameter
private final java.util.List<WasmType> parameter
-
resultType
private final WasmType resultType
-
-
Constructor Detail
-
FunctionType
FunctionType(TypesSection section, java.util.List<WasmType> parameter, WasmType resultType)
-
FunctionType
FunctionType(TypesSection section, java.util.List<WasmType> parameter)
-
FunctionType
FunctionType(TypesSection section, WasmType resultType)
-
-
Method Detail
-
matches
public boolean matches(WasmType otherResultType)
-
matches
public boolean matches(java.util.List<WasmType> otherParameter)
-
isVoid
public boolean isVoid()
-
getResultType
public WasmType getResultType()
-
getParameter
public java.util.List<WasmType> getParameter()
-
writeTo
public void writeTo(TextWriter writer)
-
writeRefTo
public void writeRefTo(TextWriter writer)
- Specified by:
writeRefToin interfaceWasmType
-
writeTo
public void writeTo(BinaryWriter.Writer writer) throws java.io.IOException
-
-