|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.cojen.classfile.Attribute
public abstract class Attribute
This class corresponds to the attribute_info structure defined in section 4.7 of The Java Virtual Machine Specification.
ClassFile
Field Summary | |
---|---|
static String |
CODE
|
static String |
CONSTANT_VALUE
|
static String |
DEPRECATED
|
static String |
ENCLOSING_METHOD
|
static String |
EXCEPTIONS
|
static String |
INNER_CLASSES
|
static String |
LINE_NUMBER_TABLE
|
static String |
LOCAL_VARIABLE_TABLE
|
static String |
RUNTIME_INVISIBLE_ANNOTATIONS
|
static String |
RUNTIME_INVISIBLE_PARAMETER_ANNOTATIONS
|
static String |
RUNTIME_VISIBLE_ANNOTATIONS
|
static String |
RUNTIME_VISIBLE_PARAMETER_ANNOTATIONS
|
static String |
SIGNATURE
|
static String |
SOURCE_FILE
|
static String |
SYNTHETIC
|
Constructor Summary | |
---|---|
protected |
Attribute(ConstantPool cp,
String name)
|
Method Summary | |
---|---|
Attribute[] |
getAttributes()
Some attributes have sub-attributes. |
ConstantPool |
getConstantPool()
Returns the ConstantPool that this attribute is defined against. |
abstract int |
getLength()
Returns the length (in bytes) of this attribute in the class file. |
String |
getName()
Returns the name of this attribute. |
ConstantUTFInfo |
getNameConstant()
|
static Attribute |
readFrom(ConstantPool cp,
DataInput din,
AttributeFactory attrFactory)
|
void |
writeDataTo(DataOutput dout)
Write just the attribute specific data. |
void |
writeTo(DataOutput dout)
This method writes the 16 bit name constant index followed by the 32 bit attribute length, followed by the attribute specific data. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String CODE
public static final String CONSTANT_VALUE
public static final String DEPRECATED
public static final String EXCEPTIONS
public static final String INNER_CLASSES
public static final String LINE_NUMBER_TABLE
public static final String LOCAL_VARIABLE_TABLE
public static final String SOURCE_FILE
public static final String SYNTHETIC
public static final String SIGNATURE
public static final String ENCLOSING_METHOD
public static final String RUNTIME_VISIBLE_ANNOTATIONS
public static final String RUNTIME_INVISIBLE_ANNOTATIONS
public static final String RUNTIME_VISIBLE_PARAMETER_ANNOTATIONS
public static final String RUNTIME_INVISIBLE_PARAMETER_ANNOTATIONS
Constructor Detail |
---|
protected Attribute(ConstantPool cp, String name)
Method Detail |
---|
public ConstantPool getConstantPool()
public String getName()
public ConstantUTFInfo getNameConstant()
public Attribute[] getAttributes()
public abstract int getLength()
public final void writeTo(DataOutput dout) throws IOException
IOException
public void writeDataTo(DataOutput dout) throws IOException
IOException
public static Attribute readFrom(ConstantPool cp, DataInput din, AttributeFactory attrFactory) throws IOException
attrFactory
- optional factory for reading custom attributes
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |