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>
parameter
private WasmType
resultType
private TypesSection
typesSection
-
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()
WasmType
getResultType()
int
index()
boolean
isVoid()
boolean
matches(WasmType otherResultType)
boolean
matches(java.util.List<WasmType> otherParameter)
boolean
matches(java.util.List<WasmType> otherParameter, WasmType otherResultType)
void
writeRefTo(TextWriter writer)
void
writeTo(BinaryWriter.Writer writer)
void
writeTo(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:
writeRefTo
in interfaceWasmType
-
writeTo
public void writeTo(BinaryWriter.Writer writer) throws java.io.IOException
-
-