public class ClassElementValue extends ElementValue
Modifier and Type | Field and Description |
---|---|
static String |
ENTRY_NAME |
ANNOTATION_TAG, ANNOTATION_TAG_VERBOSE, ARRAY_TAG, ARRAY_TAG_VERBOSE, BOOL_TAG, BOOL_TAG_VERBOSE, BYTE_TAG, BYTE_TAG_VERBOSE, CHAR_TAG, CHAR_TAG_VERBOSE, CLASS_TAG, CLASS_TAG_VERBOSE, DOUBLE_TAG, DOUBLE_TAG_VERBOSE, ENUM_TAG, ENUM_TAG_VERBOSE, FLOAT_TAG, FLOAT_TAG_VERBOSE, INITIAL_LENGTH, INT_TAG, INT_TAG_VERBOSE, LONG_TAG, LONG_TAG_VERBOSE, SHORT_TAG, SHORT_TAG_VERBOSE, STRING_TAG, STRING_TAG_VERBOSE
classFile, debug, SYSTEM_PROPERTY_DEBUG
Modifier | Constructor and Description |
---|---|
protected |
ClassElementValue() |
Modifier and Type | Method and Description |
---|---|
protected void |
debug(String message)
Utility method for derived structures.
|
int |
getClassInfoIndex()
Get the class_info_index of this element value entry.
|
String |
getEntryName() |
protected int |
getSpecificLength() |
void |
read(DataInput in)
Read this structure from the given DataInput.
|
void |
setClassInfoIndex(int classInfoIndex)
Set the class_info_index of this element value entry.
|
void |
write(DataOutput out)
Write this structure to the given DataOutput.
|
create, getLength, getTag, getTagDescription, printAccessFlagsVerbose
getClassFile, getDebug, getLength, printAccessFlags, printAccessFlagsVerbose, printBytes, setClassFile, setDebug
public static final String ENTRY_NAME
public int getClassInfoIndex()
public void setClassInfoIndex(int classInfoIndex)
classInfoIndex
- the class_info_indexprotected int getSpecificLength()
getSpecificLength
in class ElementValue
public void read(DataInput in) throws InvalidByteCodeException, IOException
AbstractStructure
Excpects 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 AbstractStructure
in
- the DataInput from which to readInvalidByteCodeException
- if the byte code is invalidIOException
- if an exception occurs with the DataInputpublic void write(DataOutput out) throws InvalidByteCodeException, IOException
AbstractStructure
The written bytes are in JVM class file format.
write
in class ElementValue
out
- the DataOutput to which to writeInvalidByteCodeException
- if the structure is internally inconsistentIOException
- if an exception occurs with the DataOutputprotected void debug(String message)
AbstractStructure
debug
in class AbstractStructure
message
- the debug messagepublic String getEntryName()
getEntryName
in class ElementValue