Enum ValueTag
- java.lang.Object
-
- java.lang.Enum<ValueTag>
-
- com.tonic.analysis.execution.state.ValueTag
-
- All Implemented Interfaces:
Serializable,Comparable<ValueTag>
public enum ValueTag extends Enum<ValueTag>
Runtime type of an interpreted value, carrying its JVM slot category.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DOUBLEA 64-bit floating point value occupying two slots.FLOATA 32-bit floating point value occupying one slot.INTA 32-bit signed integer occupying one slot.LONGA 64-bit signed integer occupying two slots.NULLThe null reference occupying one slot, tagged apart fromREFERENCEso an absent instance needs no heap object.REFERENCEA non-null pointer to an object or array on the interpreter heap, occupying one slot.RETURN_ADDRESSA jsr return address occupying one slot; produced only by the legacy subroutine opcodes.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetCategory()booleanisWide()static ValueTagvalueOf(String name)Returns the enum constant of this type with the specified name.static ValueTag[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INT
public static final ValueTag INT
A 32-bit signed integer occupying one slot.
-
LONG
public static final ValueTag LONG
A 64-bit signed integer occupying two slots.
-
FLOAT
public static final ValueTag FLOAT
A 32-bit floating point value occupying one slot.
-
DOUBLE
public static final ValueTag DOUBLE
A 64-bit floating point value occupying two slots.
-
REFERENCE
public static final ValueTag REFERENCE
A non-null pointer to an object or array on the interpreter heap, occupying one slot.
-
NULL
public static final ValueTag NULL
The null reference occupying one slot, tagged apart fromREFERENCEso an absent instance needs no heap object.
-
RETURN_ADDRESS
public static final ValueTag RETURN_ADDRESS
A jsr return address occupying one slot; produced only by the legacy subroutine opcodes.
-
-
Method Detail
-
values
public static ValueTag[] 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 (ValueTag c : ValueTag.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ValueTag valueOf(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:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getCategory
public int getCategory()
- Returns:
- the category
-
isWide
public boolean isWide()
- Returns:
- true for the category 2 types long and double, which occupy two slots
-
-