Package javassist.bytecode
Class ConstantAttribute
- java.lang.Object
-
- javassist.bytecode.AttributeInfo
-
- javassist.bytecode.ConstantAttribute
-
public class ConstantAttribute extends AttributeInfo
ConstantValue_attribute
.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
tag
The name of this attribute"ConstantValue"
.
-
Constructor Summary
Constructors Constructor Description ConstantAttribute(ConstPool cp, int index)
Constructs a ConstantValue attribute.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AttributeInfo
copy(ConstPool newCp, java.util.Map<java.lang.String,java.lang.String> classnames)
Makes a copy.int
getConstantValue()
Returnsconstantvalue_index
.-
Methods inherited from class javassist.bytecode.AttributeInfo
get, getConstPool, getName, length, set
-
-
-
-
Field Detail
-
tag
public static final java.lang.String tag
The name of this attribute"ConstantValue"
.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ConstantAttribute
public ConstantAttribute(ConstPool cp, int index)
Constructs a ConstantValue attribute.- Parameters:
cp
- a constant pool table.index
-constantvalue_index
ofConstantValue_attribute
.
-
-
Method Detail
-
getConstantValue
public int getConstantValue()
Returnsconstantvalue_index
.
-
copy
public AttributeInfo copy(ConstPool newCp, java.util.Map<java.lang.String,java.lang.String> classnames)
Makes a copy. Class names are replaced according to the givenMap
object.- Overrides:
copy
in classAttributeInfo
- Parameters:
newCp
- the constant pool table used by the new copy.classnames
- pairs of replaced and substituted class names.
-
-