public class ConstantValue extends AttributeInfo
ConstantValue" attribute, as defined by 4.7.2 of the
JVM specification.attributeNameIndex| Constructor and Description |
|---|
ConstantValue(ClassFile cf,
int constantValueIndex)
CConstructor.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getConstantValueAsString()
Returns the constant's value, as a string.
|
int |
getConstantValueIndex()
Returns the index into the constant pool that gives the constant value
represented by this attribute.
|
getClassFile, getName, readUnsupportedAttributepublic ConstantValue(ClassFile cf, int constantValueIndex)
cf - The class file.constantValueIndex - The index into the constant pool that gives
the constant value represented by this attribute.public int getConstantValueIndex()
public java.lang.String getConstantValueAsString()