Package com.tonic.analysis.instruction
Enum NewPrimitiveArrayInstruction.ArrayType
- java.lang.Object
-
- java.lang.Enum<NewPrimitiveArrayInstruction.ArrayType>
-
- com.tonic.analysis.instruction.NewPrimitiveArrayInstruction.ArrayType
-
- All Implemented Interfaces:
Serializable,Comparable<NewPrimitiveArrayInstruction.ArrayType>
- Enclosing class:
- NewPrimitiveArrayInstruction
public static enum NewPrimitiveArrayInstruction.ArrayType extends Enum<NewPrimitiveArrayInstruction.ArrayType>
The primitive element types NEWARRAY can allocate, each pairing an atype code with a description.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description T_BOOLEANBoolean elements, atype 4; the JVM stores them one byte apiece.T_BYTESigned 8-bit elements, atype 8; boolean arrays share this storage width.T_CHARUnsigned 16-bit character elements, atype 5.T_DOUBLE64-bit floating point elements, atype 7.T_FLOAT32-bit floating point elements, atype 6.T_INTSigned 32-bit elements, atype 10.T_LONGSigned 64-bit elements, atype 11.T_SHORTSigned 16-bit elements, atype 9.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static NewPrimitiveArrayInstruction.ArrayTypefromCode(int code)Looks up the element type for a NEWARRAY atype code.intgetCode()StringgetDescription()static NewPrimitiveArrayInstruction.ArrayTypevalueOf(String name)Returns the enum constant of this type with the specified name.static NewPrimitiveArrayInstruction.ArrayType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
T_BOOLEAN
public static final NewPrimitiveArrayInstruction.ArrayType T_BOOLEAN
Boolean elements, atype 4; the JVM stores them one byte apiece.
-
T_CHAR
public static final NewPrimitiveArrayInstruction.ArrayType T_CHAR
Unsigned 16-bit character elements, atype 5.
-
T_FLOAT
public static final NewPrimitiveArrayInstruction.ArrayType T_FLOAT
32-bit floating point elements, atype 6.
-
T_DOUBLE
public static final NewPrimitiveArrayInstruction.ArrayType T_DOUBLE
64-bit floating point elements, atype 7.
-
T_BYTE
public static final NewPrimitiveArrayInstruction.ArrayType T_BYTE
Signed 8-bit elements, atype 8; boolean arrays share this storage width.
-
T_SHORT
public static final NewPrimitiveArrayInstruction.ArrayType T_SHORT
Signed 16-bit elements, atype 9.
-
T_INT
public static final NewPrimitiveArrayInstruction.ArrayType T_INT
Signed 32-bit elements, atype 10.
-
T_LONG
public static final NewPrimitiveArrayInstruction.ArrayType T_LONG
Signed 64-bit elements, atype 11.
-
-
Method Detail
-
values
public static NewPrimitiveArrayInstruction.ArrayType[] 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 (NewPrimitiveArrayInstruction.ArrayType c : NewPrimitiveArrayInstruction.ArrayType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static NewPrimitiveArrayInstruction.ArrayType 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
-
getCode
public int getCode()
- Returns:
- the code
-
getDescription
public String getDescription()
- Returns:
- the description
-
fromCode
public static NewPrimitiveArrayInstruction.ArrayType fromCode(int code)
Looks up the element type for a NEWARRAY atype code.- Parameters:
code- the atype operand (4-11)- Returns:
- the matching element type, or null if the code is not a valid atype
-
-