public class ElementValuePair extends AbstractStructure
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ENTRY_NAME |
classFile, debug, SYSTEM_PROPERTY_DEBUG| Constructor and Description |
|---|
ElementValuePair() |
| Modifier and Type | Method and Description |
|---|---|
static ElementValuePair |
create(java.io.DataInput in,
ClassFile classFile)
Factory for creating ElementValuePair structures.
|
int |
getElementNameIndex()
Get the element_name_index of this element value pair.
|
ElementValue |
getElementValue()
Get the element_value of this element value pair.
|
java.lang.String |
getEntryName() |
protected int |
getLength() |
protected java.lang.String |
printAccessFlagsVerbose(int accessFlags)
Utility method for derived structures.
|
void |
read(java.io.DataInput in)
Read this structure from the given DataInput.
|
void |
setElementNameIndex(int elementNameIndex)
Set the element_name_index of this element value pair.
|
void |
setElementValue(ElementValue elementValue)
Set the element_value of this element value pair.
|
void |
write(java.io.DataOutput out)
Write this structure to the given DataOutput.
|
debug, getClassFile, getDebug, getLength, printAccessFlags, printAccessFlagsVerbose, printBytes, setClassFile, setDebugpublic static final java.lang.String ENTRY_NAME
public static ElementValuePair create(java.io.DataInput in, ClassFile classFile) throws InvalidByteCodeException, java.io.IOException
in - the DataInput from which to read the
ElementValuePair structureclassFile - the parent class file of the structure to be createdInvalidByteCodeException - if the byte code is invalidjava.io.IOException - if an exception occurs with the DataInputpublic ElementValue getElementValue()
public void setElementValue(ElementValue elementValue)
elementValue - the element_valuepublic int getElementNameIndex()
public void setElementNameIndex(int elementNameIndex)
elementNameIndex - the element_name_indexpublic void read(java.io.DataInput in)
throws InvalidByteCodeException,
java.io.IOException
AbstractStructureExcpects DataInput to be in JVM class file format and just before a structure of this kind. No look ahead parsing since the class file format is deterministic.
read in class AbstractStructurein - the DataInput from which to readInvalidByteCodeException - if the byte code is invalidjava.io.IOException - if an exception occurs with the DataInputpublic void write(java.io.DataOutput out)
throws InvalidByteCodeException,
java.io.IOException
AbstractStructureThe written bytes are in JVM class file format.
write in class AbstractStructureout - the DataOutput to which to writeInvalidByteCodeException - if the structure is internally inconsistentjava.io.IOException - if an exception occurs with the DataOutputprotected java.lang.String printAccessFlagsVerbose(int accessFlags)
AbstractStructureprintAccessFlagsVerbose in class AbstractStructureaccessFlags - the unsigned short value to print as a hex stringprotected int getLength()
public java.lang.String getEntryName()