public class ConstantAttribute extends AttributeInfo
ConstantValue_attribute.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
tag
The name of this attribute
"ConstantValue". |
constPool, info, name| Constructor and Description |
|---|
ConstantAttribute(ConstPool cp,
int index)
Constructs a ConstantValue attribute.
|
ConstantAttribute(ConstPool cp,
int n,
java.io.DataInputStream in) |
| Modifier and Type | Method and Description |
|---|---|
AttributeInfo |
copy(ConstPool newCp,
java.util.Map classnames)
Makes a copy.
|
int |
getConstantValue()
Returns
constantvalue_index. |
copyAll, get, getConstPool, getLength, getName, getRefClasses, getRefClasses, length, lookup, read, remove, renameClass, renameClass, renameClass, renameClass, set, write, writeAllpublic static final java.lang.String tag
"ConstantValue".ConstantAttribute(ConstPool cp, int n, java.io.DataInputStream in) throws java.io.IOException
java.io.IOExceptionpublic ConstantAttribute(ConstPool cp, int index)
cp - a constant pool table.index - constantvalue_index
of ConstantValue_attribute.public int getConstantValue()
constantvalue_index.public AttributeInfo copy(ConstPool newCp, java.util.Map classnames)
Map object.copy in class AttributeInfonewCp - the constant pool table used by the new copy.classnames - pairs of replaced and substituted
class names.