public class AttributeInfo extends Object
| Modifier and Type | Field and Description |
|---|---|
protected ConstPool |
constPool |
protected byte[] |
info |
protected int |
name |
| Modifier | Constructor and Description |
|---|---|
protected |
AttributeInfo(ConstPool cp,
int attrname,
byte[] attrinfo) |
protected |
AttributeInfo(ConstPool cp,
int n,
DataInput in) |
protected |
AttributeInfo(ConstPool cp,
String attrname) |
|
AttributeInfo(ConstPool cp,
String attrname,
byte[] attrinfo)
Constructs an
attribute_info structure. |
| Modifier and Type | Method and Description |
|---|---|
AttributeInfo |
copy(ConstPool newCp,
Map<?,?> classnames)
Makes a copy.
|
static ArrayList<AttributeInfo> |
copyAll(ArrayList<?> list,
ConstPool cp) |
byte[] |
get()
Returns the
info field
of this attribute_info structure. |
ConstPool |
getConstPool()
Returns a constant pool table.
|
static int |
getLength(ArrayList<?> list) |
String |
getName()
Returns an attribute name.
|
int |
length()
Returns the length of this
attribute_info
structure. |
static AttributeInfo |
lookup(ArrayList<?> list,
String name) |
static AttributeInfo |
read(ConstPool cp,
DataInput in) |
static void |
remove(ArrayList<?> list,
String name) |
static void |
renameClass(List<?> attributes,
Map<?,?> classnames) |
static void |
renameClass(List<?> attributes,
String oldname,
String newname) |
void |
set(byte[] newinfo)
Sets the
info field
of this attribute_info structure. |
static void |
writeAll(ArrayList<?> list,
DataOutputStream out) |
protected ConstPool constPool
protected int name
protected byte[] info
protected AttributeInfo(ConstPool cp, int attrname, byte[] attrinfo)
public AttributeInfo(ConstPool cp, 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, DataInput in) throws IOException
IOExceptionpublic static AttributeInfo read(ConstPool cp, DataInput in) throws IOException
IOExceptionpublic 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, Map<?,?> classnames)
Map object.newCp - the constant pool table used by the new copy.classnames - pairs of replaced and substituted
class names.public static int getLength(ArrayList<?> list)
public static AttributeInfo lookup(ArrayList<?> list, String name)
public static void writeAll(ArrayList<?> list, DataOutputStream out) throws IOException
IOExceptionpublic static ArrayList<AttributeInfo> copyAll(ArrayList<?> list, ConstPool cp)
Copyright © December 07, 2012–2015 The Internet Party. All rights reserved.