|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--EDU.purdue.cs.bloat.reflect.Constant
A Constant is used to represent an item in the constant pool of a class.
| Field Summary | |
static byte |
CLASS
Constant tag for class types. |
static byte |
DOUBLE
Constant tag for double constants. |
static byte |
FIELD_REF
Constant tag for field references. |
static byte |
FLOAT
Constant tag for float constants. |
static byte |
INTEGER
Constant tag for int, short, byte, char, and boolean constants. |
static byte |
INTERFACE_METHOD_REF
Constant tag for method references. |
static byte |
LONG
Constant tag for long constants. |
static byte |
METHOD_REF
Constant tag for method references. |
static byte |
NAME_AND_TYPE
Constant tag for holding the name and type of a field or method. |
static byte |
STRING
Constant tag for java.lang.String constants. |
static byte |
UTF8
Constant tag for holding the a UTF8 format string. |
| Constructor Summary | |
Constant(int tag,
java.lang.Object value)
|
|
| Method Summary | |
boolean |
equals(java.lang.Object other)
Check if an object is equal to this constant. |
int |
hashCode()
Hash the constant. |
int |
tag()
Get the tag of the constant. |
java.lang.String |
toString()
Convert the constant to a string. |
java.lang.Object |
value()
Get the value of the constant. |
| Methods inherited from class java.lang.Object |
clone,
finalize,
getClass,
notify,
notifyAll,
wait,
wait,
wait |
| Field Detail |
public static final byte CLASS
public static final byte FIELD_REF
public static final byte METHOD_REF
public static final byte STRING
public static final byte INTEGER
public static final byte FLOAT
public static final byte LONG
public static final byte DOUBLE
public static final byte INTERFACE_METHOD_REF
public static final byte NAME_AND_TYPE
public static final byte UTF8
| Constructor Detail |
public Constant(int tag,
java.lang.Object value)
tag - The constant's tag.value - The constant's value.| Method Detail |
public final int tag()
public final java.lang.Object value()
public int hashCode()
public boolean equals(java.lang.Object other)
obj - The object to compare against.public java.lang.String toString()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||