Top Description Fields Constructors Methods
javassist.bytecode

public Class ConstantAttribute

extends AttributeInfo
Class Inheritance
Imports
java.io.DataInputStream, .IOException, java.util.Map

ConstantValue_attribute.

Field Summary

Modifier and TypeField and Description
public static final String
tag

The name of this attribute "ConstantValue".

Inherited from javassist.bytecode.AttributeInfo:
constPoolinfoname

Constructor Summary

AccessConstructor and Description
pack-priv
public
ConstantAttribute(ConstPool
a constant pool table.
cp
,
int
constantvalue_index of ConstantValue_attribute.
index
)

Constructs a ConstantValue attribute.

Method Summary

Modifier and TypeMethod and Description
public AttributeInfo
copy(ConstPool
the constant pool table used by the new copy.
newCp
,
Map<String, String>
pairs of replaced and substituted class names.
classnames
)

Overrides javassist.bytecode.AttributeInfo.copy.

Makes a copy.

public int
getConstantValue()

Returns constantvalue_index.

Inherited from javassist.bytecode.AttributeInfo:
copyAllgetgetConstPoolgetLengthgetNamegetRefClassesgetRefClasseslengthlookupreadremoverenameClassrenameClassrenameClassrenameClasssetwritewriteAll

Field Detail

tagback to summary
public static final String tag

The name of this attribute "ConstantValue".

Constructor Detail

ConstantAttributeback to summary
pack-priv ConstantAttribute(ConstPool cp, int n, DataInputStream in) throws IOException
ConstantAttributeback to summary
public ConstantAttribute(ConstPool cp, int index)

Constructs a ConstantValue attribute.

Parameters
cp:ConstPool

a constant pool table.

index:int

constantvalue_index of ConstantValue_attribute.

Method Detail

copyback to summary
public AttributeInfo copy(ConstPool newCp, Map<String, String> classnames)

Overrides javassist.bytecode.AttributeInfo.copy.

Makes a copy. Class names are replaced according to the given Map object.

Parameters
newCp:ConstPool

the constant pool table used by the new copy.

classnames:Map<String, String>

pairs of replaced and substituted class names.

Annotations
@Override
getConstantValueback to summary
public int getConstantValue()

Returns constantvalue_index.