|
ej-technologies | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.gjt.jclasslib.structures.AbstractStructure
org.gjt.jclasslib.structures.AbstractStructureWithAttributes
public abstract class AbstractStructureWithAttributes
Base class for all structures with attributes.
| Field Summary | |
|---|---|
protected AttributeInfo[] |
attributes
Attributes of this structure. |
| Fields inherited from class org.gjt.jclasslib.structures.AbstractStructure |
|---|
classFile, debug, SYSTEM_PROPERTY_DEBUG |
| Constructor Summary | |
|---|---|
AbstractStructureWithAttributes()
|
|
| Method Summary | |
|---|---|
AttributeInfo |
findAttribute(java.lang.Class attributeClass)
Find an attribute of a certain class. |
AttributeInfo[] |
getAttributes()
Get the attributes of this structure. |
protected int |
getTotalAttributesLength()
Get the length of all attributes as a number of bytes. |
protected void |
readAttributes(java.io.DataInput in)
Read the attributes of this structure from the given DataInput. |
void |
setAttributes(AttributeInfo[] attributes)
Set the attributes of this structure. |
protected void |
writeAttributes(java.io.DataOutput out)
Write the attributes of this structure to the given DataOutput. |
| Methods inherited from class org.gjt.jclasslib.structures.AbstractStructure |
|---|
debug, getClassFile, getDebug, getLength, printAccessFlags, printAccessFlagsVerbose, printAccessFlagsVerbose, printBytes, read, setClassFile, setDebug, write |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected AttributeInfo[] attributes
| Constructor Detail |
|---|
public AbstractStructureWithAttributes()
| Method Detail |
|---|
public AttributeInfo[] getAttributes()
public void setAttributes(AttributeInfo[] attributes)
attributes - the new attributespublic AttributeInfo findAttribute(java.lang.Class attributeClass)
attributeClass - the class of the attribute
protected void readAttributes(java.io.DataInput in)
throws InvalidByteCodeException,
java.io.IOException
Excpects DataInput to be in JVM class file format and just before an attribute length field.
in - the DataInput from which to read
InvalidByteCodeException - if the byte code is invalid
java.io.IOException - if an exception occurs with the DataInput
protected void writeAttributes(java.io.DataOutput out)
throws InvalidByteCodeException,
java.io.IOException
The written bytes are in JVM class file format.
out - the DataOutput to which to write
InvalidByteCodeException - if the structure is internally inconsistent
java.io.IOException - if an exception occurs with the DataOutputprotected int getTotalAttributesLength()
|
ej-technologies | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||