gnu.bytecode
public abstract class Attribute extends Object
Various sub-classses are used for standard attributes, or you can use MiscAttr for a generic attribute.
Constructor Summary | |
---|---|
Attribute(String name) Create a new Attribute. |
Method Summary | |
---|---|
void | addToFrontOf(AttrContainer container) Add this to (the front of) of the specified attribute container. |
void | assignConstants(ClassType cl) Add any needed constant pool entries for this Attribute.
|
static void | assignConstants(AttrContainer container, ClassType cl) Add any needed constant pool entries for all attributes in a container.
|
static int | count(AttrContainer container) |
static Attribute | get(AttrContainer container, String name) Find an Attribute by name, in an attribute cointainer. |
AttrContainer | getContainer() Return the Attribute container that contains this Attribute. |
abstract int | getLength() Return the length of the attribute in bytes.
|
static int | getLengthAll(AttrContainer container) Return the length of all the attributes (with headers) in bytes. |
String | getName() |
int | getNameIndex() |
Attribute | getNext() Get the next Attribute belonging to getContainer(). |
boolean | isSkipped() Returns true if this attribute should be skipped on output. |
void | print(ClassTypeWriter dst) |
void | setContainer(AttrContainer container) |
void | setName(String name) |
void | setNameIndex(int index) |
void | setNext(Attribute next) Set the next Attribute in the chain belonging to getContainer(). |
void | setSkipped(boolean skip) Iff skip, cause this attributed to be skipped on output. |
void | setSkipped() Cause this attributed to be skipped on output. |
abstract void | write(DataOutputStream dstr) Write out the contents of the Attribute.
|
static void | writeAll(AttrContainer container, DataOutputStream dstr) |
Parameters: name - an interned String that names the Attribute.
Parameters: container the attribute container to search name the (interned) name of the attribute we are seeking
Returns: the matching Attribute, or null if the search failed.