Interface AnyType
- All Known Implementing Classes:
ArrayType, TypeManager.BlockType, TypeManager.LambdaType, TypeManager.StructType, ValueType
public interface AnyType
Interface of all possible types in WebAssembly. This are predefined (native) types and custom types in the type section.
numtype ::= i32 | i64 | f32 | f64
packedtype ::= i8 | i16
reftype ::= anyref | funcref | nullref
valtype ::= numtype | reftype
deftype ::= functype | structtype | arraytype
storagetype ::= valtype | packedtype
-
Method Summary
Modifier and TypeMethodDescriptionintgetCode()The type code(typeidx) in WebAssembly.booleanIf the type is a reference type.booleanisSubTypeOf(AnyType other) Check if this is a sub type of given type.
-
Method Details
-
getCode
int getCode()The type code(typeidx) in WebAssembly. Predefined types have an negative typeidx. Custom types have the positive index in the type section.- Returns:
- the code
-
isRefType
boolean isRefType()If the type is a reference type. A GC reference to the heap.- Returns:
- true, is GC type
-
isSubTypeOf
-