javassist.bytecode

Class ConstantAttribute

public class ConstantAttribute extends AttributeInfo

ConstantValue_attribute.
Field Summary
static Stringtag
The name of this attribute "ConstantValue".
Constructor Summary
ConstantAttribute(ConstPool cp, int index)
Constructs a ConstantValue attribute.
Method Summary
AttributeInfocopy(ConstPool newCp, Map classnames)
Makes a copy.
intgetConstantValue()
Returns constantvalue_index.

Field Detail

tag

public static final String tag
The name of this attribute "ConstantValue".

Constructor Detail

ConstantAttribute

public ConstantAttribute(ConstPool cp, int index)
Constructs a ConstantValue attribute.

Parameters: cp a constant pool table. index constantvalue_index of ConstantValue_attribute.

Method Detail

copy

public AttributeInfo copy(ConstPool newCp, Map classnames)
Makes a copy. Class names are replaced according to the given Map object.

Parameters: newCp the constant pool table used by the new copy. classnames pairs of replaced and substituted class names.

getConstantValue

public int getConstantValue()
Returns constantvalue_index.
Javassist, a Java-bytecode translator toolkit.
Copyright (C) 1999-2006 Shigeru Chiba. All Rights Reserved.