Package com.dylibso.chicory.wasm.types
Class TypeSection
- java.lang.Object
-
- com.dylibso.chicory.wasm.types.Section
-
- com.dylibso.chicory.wasm.types.TypeSection
-
public class TypeSection extends Section
-
-
Constructor Summary
Constructors Constructor Description TypeSection()Construct a new, empty section instance.TypeSection(int estimatedSize)Construct a new, empty section instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intaddFunctionType(FunctionType functionType)Add a function type definition to this section.FunctionTypegetType(int idx)inttypeCount()FunctionType[]types()
-
-
-
Method Detail
-
types
public FunctionType[] types()
-
typeCount
public int typeCount()
-
getType
public FunctionType getType(int idx)
-
addFunctionType
public int addFunctionType(FunctionType functionType)
Add a function type definition to this section.- Parameters:
functionType- the function type to add to this section (must not benull)- Returns:
- the index of the newly-added function type
-
-