AnnotationDefaultAttribute
, AnnotationsAttribute
, BootstrapMethodsAttribute
, CodeAttribute
, ConstantAttribute
, DeprecatedAttribute
, EnclosingMethodAttribute
, ExceptionsAttribute
, InnerClassesAttribute
, LineNumberAttribute
, LocalVariableAttribute
, MethodParametersAttribute
, ParameterAnnotationsAttribute
, SignatureAttribute
, SourceFileAttribute
, StackMap
, StackMapTable
, SyntheticAttribute
, TypeAnnotationsAttribute
public class AttributeInfo
extends java.lang.Object
attribute_info
structure.Modifier | Constructor | Description |
---|---|---|
protected |
AttributeInfo(ConstPool cp,
int attrname,
byte[] attrinfo) |
|
protected |
AttributeInfo(ConstPool cp,
int n,
java.io.DataInputStream in) |
|
protected |
AttributeInfo(ConstPool cp,
java.lang.String attrname) |
|
|
AttributeInfo(ConstPool cp,
java.lang.String attrname,
byte[] attrinfo) |
Constructs an
attribute_info structure. |
Modifier and Type | Method | Description |
---|---|---|
AttributeInfo |
copy(ConstPool newCp,
java.util.Map classnames) |
Makes a copy.
|
byte[] |
get() |
Returns the
info field
of this attribute_info structure. |
ConstPool |
getConstPool() |
Returns a constant pool table.
|
java.lang.String |
getName() |
Returns an attribute name.
|
int |
length() |
Returns the length of this
attribute_info
structure. |
void |
set(byte[] newinfo) |
Sets the
info field
of this attribute_info structure. |
protected ConstPool constPool
protected AttributeInfo(ConstPool cp, int attrname, byte[] attrinfo)
protected AttributeInfo(ConstPool cp, java.lang.String attrname)
public AttributeInfo(ConstPool cp, java.lang.String attrname, byte[] attrinfo)
attribute_info
structure.cp
- constant pool tableattrname
- attribute nameattrinfo
- info
field
of attribute_info
structure.protected AttributeInfo(ConstPool cp, int n, java.io.DataInputStream in) throws java.io.IOException
java.io.IOException
public java.lang.String getName()
public ConstPool getConstPool()
public int length()
attribute_info
structure.
The returned value is attribute_length + 6
.public byte[] get()
info
field
of this attribute_info
structure.
This method is not available if the object is an instance
of CodeAttribute
.
public void set(byte[] newinfo)
info
field
of this attribute_info
structure.
This method is not available if the object is an instance
of CodeAttribute
.
public AttributeInfo copy(ConstPool newCp, java.util.Map classnames)
Map
object.newCp
- the constant pool table used by the new copy.classnames
- pairs of replaced and substituted
class names.Copyright © 2018 Shigeru Chiba, www.javassist.org. All Rights Reserved.