|
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
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(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(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(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(Class attributeClass)
attributeClass
- the class of the attribute
protected void readAttributes(DataInput in) throws InvalidByteCodeException, 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
IOException
- if an exception occurs with the DataInputprotected void writeAttributes(DataOutput out) throws InvalidByteCodeException, IOException
The written bytes are in JVM class file format.
out
- the DataOutput to which to write
InvalidByteCodeException
- if the structure is internally inconsistent
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 |