public abstract class AbstractStructureWithAttributes extends AbstractStructure
| Modifier and Type | Field and Description |
|---|---|
protected AttributeInfo[] |
attributes
Attributes of this structure.
|
classFile, debug, SYSTEM_PROPERTY_DEBUG| Constructor and Description |
|---|
AbstractStructureWithAttributes() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
debug, getClassFile, getDebug, getLength, printAccessFlags, printAccessFlagsVerbose, printAccessFlagsVerbose, printBytes, read, setClassFile, setDebug, writeprotected AttributeInfo[] attributes
public AttributeInfo[] getAttributes()
public void setAttributes(AttributeInfo[] attributes)
attributes - the new attributespublic AttributeInfo findAttribute(java.lang.Class attributeClass)
attributeClass - the class of the attributeprotected 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 readInvalidByteCodeException - if the byte code is invalidjava.io.IOException - if an exception occurs with the DataInputprotected 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 writeInvalidByteCodeException - if the structure is internally inconsistentjava.io.IOException - if an exception occurs with the DataOutputprotected int getTotalAttributesLength()