Enum ValueType
- java.lang.Object
-
- java.lang.Enum<ValueType>
-
- de.inetsoftware.jwebassembly.wasm.ValueType
-
-
Field Summary
Fields Modifier and Type Field Description private int
code
-
Constructor Summary
Constructors Modifier Constructor Description private
ValueType(int code)
Create instance of the enum
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getCode()
The operation code in WebAssembly.boolean
isRefType()
If the type is a reference type.boolean
isSubTypeOf(AnyType type)
Check if this is a sub type of given type.static ValueType
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static ValueType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
i32
public static final ValueType i32
-
i64
public static final ValueType i64
-
f32
public static final ValueType f32
-
f64
public static final ValueType f64
-
v128
public static final ValueType v128
-
bool
public static final ValueType bool
-
i8
public static final ValueType i8
-
i16
public static final ValueType i16
-
u16
public static final ValueType u16
-
funcref
public static final ValueType funcref
-
externref
public static final ValueType externref
-
anyref
public static final ValueType anyref
-
eqref
public static final ValueType eqref
-
optref
public static final ValueType optref
-
ref
public static final ValueType ref
-
exnref
public static final ValueType exnref
-
func
public static final ValueType func
-
struct
public static final ValueType struct
-
array
public static final ValueType array
-
empty
public static final ValueType empty
-
-
Method Detail
-
values
public static ValueType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ValueType c : ValueType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ValueType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getCode
public int getCode()
The operation code in WebAssembly.
-
isRefType
public boolean isRefType()
If the type is a reference type. A GC reference to the heap.
-
isSubTypeOf
public boolean isSubTypeOf(AnyType type)
Check if this is a sub type of given type.- Specified by:
isSubTypeOf
in interfaceAnyType
- Parameters:
type
- type to check- Returns:
- true, if both are identical or this is a sub type of
other
. Or ifother
is a parent type of this.
-
-