Class ArrayType
java.lang.Object
de.inetsoftware.jwebassembly.module.TypeManager.StructType
de.inetsoftware.jwebassembly.wasm.ArrayType
- All Implemented Interfaces:
AnyType
A reference to an array type
- Author:
- Volker Berlin
-
Constructor Summary
ConstructorsConstructorDescriptionArrayType(AnyType arrayType, TypeManager manager, int componentClassIndex, WasmOptions options) Create a new array type -
Method Summary
Modifier and TypeMethodDescriptionThe element type of the arrayprotected intThe running index of the component/array class/type for class meta data, instanceof and interface calls.The native webassembly array type that we wrapThe native field namebooleanIf the type is a reference type.booleanisSubTypeOf(AnyType type) Check if this is a sub type of given type.Methods inherited from class TypeManager.StructType
getClassIndex, getCode, getFields, getKind, getName, getVTable, toString, writeToStream
-
Constructor Details
-
ArrayType
public ArrayType(AnyType arrayType, @Nonnull TypeManager manager, int componentClassIndex, WasmOptions options) Create a new array type- Parameters:
arrayType- the type of the arraymanager- the manager which hold all StructTypescomponentClassIndex- the running index of the component/array class/typeoptions- compiler properties
-
-
Method Details
-
getArrayType
-
getNativeArrayType
The native webassembly array type that we wrap- Returns:
- the type
-
getNativeFieldName
-
getComponentClassIndex
protected int getComponentClassIndex()The running index of the component/array class/type for class meta data, instanceof and interface calls.- Overrides:
getComponentClassIndexin classTypeManager.StructType- Returns:
- the unique index or -1 id not an array
-
isRefType
public boolean isRefType()If the type is a reference type. A GC reference to the heap.- Specified by:
isRefTypein interfaceAnyType- Overrides:
isRefTypein classTypeManager.StructType- Returns:
- true, is GC type
-
isSubTypeOf
Check if this is a sub type of given type.- Specified by:
isSubTypeOfin interfaceAnyType- Overrides:
isSubTypeOfin classTypeManager.StructType- Parameters:
type- type to check- Returns:
- true, if both are identical or this is a sub type of
other. Or ifotheris a parent type of this.
-