Interface AnyType
-
- All Known Implementing Classes:
ArrayType,TypeManager.BlockType,TypeManager.LambdaType,TypeManager.StructType,ValueType
public interface AnyTypeInterface 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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetCode()The type code(typeidx) in WebAssembly.booleanisRefType()If the type is a reference type.booleanisSubTypeOf(AnyType other)Check if this is a sub type of given type.
-
-
-
Method Detail
-
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
boolean isSubTypeOf(@Nonnull AnyType other)Check if this is a sub type of given type.- Parameters:
other- type to check- Returns:
- true, if both are identical or this is a sub type of
other. Or ifotheris a parent type of this.
-
-