| java.lang.Object EDU.purdue.cs.bloat.reflect.Constant
Field Summary | |
final public static byte | CLASS Constant tag for class types. | final public static byte | DOUBLE Constant tag for double constants. | final public static byte | FIELD_REF Constant tag for field references. | final public static byte | FLOAT Constant tag for float constants. | final public static byte | INTEGER Constant tag for int, short, byte, char, and boolean constants. | final public static byte | INTERFACE_METHOD_REF Constant tag for method references. | final public static byte | LONG Constant tag for long constants. | final public static byte | METHOD_REF Constant tag for method references. | final public static byte | NAME_AND_TYPE Constant tag for holding the name and type of a field or method. | final public static byte | STRING Constant tag for java.lang.String constants. | final public static byte | UTF8 Constant tag for holding the a UTF8 format string. |
Method Summary | |
public boolean | equals(Object other) Check if an object is equal to this constant.
Parameters: other - The object to compare against. | public int | hashCode() Hash the constant. | final public int | tag() Get the tag of the constant. | public String | toString() Convert the constant to a string. | final public Object | value() Get the value of the constant. |
CLASS | final public static byte CLASS(Code) | | Constant tag for class types. This is used to reference other classes,
such as the superclass, and is used by the checkcast and instanceof
instructions. The Fieldref, Methodref and InterfaceMethodref constant
types refer to this constant type.
|
DOUBLE | final public static byte DOUBLE(Code) | | Constant tag for double constants.
|
FIELD_REF | final public static byte FIELD_REF(Code) | | Constant tag for field references. This is used to reference a field in
(possibly) another class. The getfield, putfield, getstatic, and
putstatic instructions use this constant type.
|
FLOAT | final public static byte FLOAT(Code) | | Constant tag for float constants.
|
INTEGER | final public static byte INTEGER(Code) | | Constant tag for int, short, byte, char, and boolean constants.
|
INTERFACE_METHOD_REF | final public static byte INTERFACE_METHOD_REF(Code) | | Constant tag for method references. This is used to reference a method in
an interface. The invokeinterface instruction uses this constant type.
|
LONG | final public static byte LONG(Code) | | Constant tag for long constants.
|
METHOD_REF | final public static byte METHOD_REF(Code) | | Constant tag for method references. This is used to reference a method in
(possibly) another class. The invokevirtual, invokespecial, and
invokestatic instructions use this constant type.
|
NAME_AND_TYPE | final public static byte NAME_AND_TYPE(Code) | | Constant tag for holding the name and type of a field or method. The
Fieldref, Methodref and InterfaceMethodref constant types refer to this
constant type.
|
STRING | final public static byte STRING(Code) | | Constant tag for java.lang.String constants. The actual string value is
stored indirectly in a Utf8 constant.
|
UTF8 | final public static byte UTF8(Code) | | Constant tag for holding the a UTF8 format string. The string is used to
hold the name and type descriptor for NameandType constants, the class
name for Class constants, the string value for String constants.
|
Constant | public Constant(int tag, Object value)(Code) | | Parameters: tag - The constant's tag. Parameters: value - The constant's value. |
equals | public boolean equals(Object other)(Code) | | Check if an object is equal to this constant.
Parameters: other - The object to compare against. true if equal, false if not. |
hashCode | public int hashCode()(Code) | | Hash the constant.
The hash code. |
tag | final public int tag()(Code) | | Get the tag of the constant.
The tag. |
toString | public String toString()(Code) | | Convert the constant to a string.
A string representation of the constant. |
value | final public Object value()(Code) | | Get the value of the constant.
The value. |
|
|