Package javassist.bytecode
Class AttributeInfo
- java.lang.Object
-
- javassist.bytecode.AttributeInfo
-
- Direct Known Subclasses:
AnnotationDefaultAttribute,AnnotationsAttribute,BootstrapMethodsAttribute,CodeAttribute,ConstantAttribute,DeprecatedAttribute,EnclosingMethodAttribute,ExceptionsAttribute,InnerClassesAttribute,LineNumberAttribute,LocalVariableAttribute,MethodParametersAttribute,NestHostAttribute,NestMembersAttribute,ParameterAnnotationsAttribute,SignatureAttribute,SourceFileAttribute,StackMap,StackMapTable,SyntheticAttribute,TypeAnnotationsAttribute
public class AttributeInfo extends java.lang.Objectattribute_infostructure.
-
-
Constructor Summary
Constructors Constructor Description AttributeInfo(ConstPool cp, java.lang.String attrname, byte[] attrinfo)Constructs anattribute_infostructure.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AttributeInfocopy(ConstPool newCp, java.util.Map<java.lang.String,java.lang.String> classnames)Makes a copy.byte[]get()Returns theinfofield of thisattribute_infostructure.ConstPoolgetConstPool()Returns a constant pool table.java.lang.StringgetName()Returns an attribute name.intlength()Returns the length of thisattribute_infostructure.voidset(byte[] newinfo)Sets theinfofield of thisattribute_infostructure.
-
-
-
Constructor Detail
-
AttributeInfo
public AttributeInfo(ConstPool cp, java.lang.String attrname, byte[] attrinfo)
Constructs anattribute_infostructure.- Parameters:
cp- constant pool tableattrname- attribute nameattrinfo-infofield ofattribute_infostructure.
-
-
Method Detail
-
getName
public java.lang.String getName()
Returns an attribute name.
-
getConstPool
public ConstPool getConstPool()
Returns a constant pool table.
-
length
public int length()
Returns the length of thisattribute_infostructure. The returned value isattribute_length + 6.
-
get
public byte[] get()
Returns theinfofield of thisattribute_infostructure.This method is not available if the object is an instance of
CodeAttribute.
-
set
public void set(byte[] newinfo)
Sets theinfofield of thisattribute_infostructure.This method is not available if the object is an instance of
CodeAttribute.
-
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 givenMapobject.- Parameters:
newCp- the constant pool table used by the new copy.classnames- pairs of replaced and substituted class names.
-
-