public class AttributeInfo
extends java.lang.Object
attribute_info
structure.Modifier and Type | Field and Description |
---|---|
protected ConstPool |
constPool |
(package private) byte[] |
info |
(package private) int |
name |
Modifier | Constructor and 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 and Description |
---|---|
AttributeInfo |
copy(ConstPool newCp,
java.util.Map classnames)
Makes a copy.
|
(package private) static java.util.ArrayList |
copyAll(java.util.ArrayList list,
ConstPool cp) |
byte[] |
get()
Returns the
info field
of this attribute_info structure. |
ConstPool |
getConstPool()
Returns a constant pool table.
|
(package private) static int |
getLength(java.util.ArrayList list) |
java.lang.String |
getName()
Returns an attribute name.
|
(package private) static void |
getRefClasses(java.util.List attributes,
java.util.Map classnames) |
(package private) void |
getRefClasses(java.util.Map classnames) |
int |
length()
Returns the length of this
attribute_info
structure. |
(package private) static AttributeInfo |
lookup(java.util.ArrayList list,
java.lang.String name) |
(package private) static AttributeInfo |
read(ConstPool cp,
java.io.DataInputStream in) |
(package private) static void |
remove(java.util.ArrayList list,
java.lang.String name) |
(package private) static void |
renameClass(java.util.List attributes,
java.util.Map classnames) |
(package private) static void |
renameClass(java.util.List attributes,
java.lang.String oldname,
java.lang.String newname) |
(package private) void |
renameClass(java.util.Map classnames) |
(package private) void |
renameClass(java.lang.String oldname,
java.lang.String newname) |
void |
set(byte[] newinfo)
Sets the
info field
of this attribute_info structure. |
(package private) void |
write(java.io.DataOutputStream out) |
(package private) static void |
writeAll(java.util.ArrayList list,
java.io.DataOutputStream out) |
protected ConstPool constPool
int name
byte[] info
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
static AttributeInfo read(ConstPool cp, 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.void write(java.io.DataOutputStream out) throws java.io.IOException
java.io.IOException
static int getLength(java.util.ArrayList list)
static AttributeInfo lookup(java.util.ArrayList list, java.lang.String name)
static void remove(java.util.ArrayList list, java.lang.String name)
static void writeAll(java.util.ArrayList list, java.io.DataOutputStream out) throws java.io.IOException
java.io.IOException
static java.util.ArrayList copyAll(java.util.ArrayList list, ConstPool cp)
void renameClass(java.lang.String oldname, java.lang.String newname)
void renameClass(java.util.Map classnames)
static void renameClass(java.util.List attributes, java.lang.String oldname, java.lang.String newname)
static void renameClass(java.util.List attributes, java.util.Map classnames)
void getRefClasses(java.util.Map classnames)
static void getRefClasses(java.util.List attributes, java.util.Map classnames)