public abstract class ElementValue extends AbstractStructure
Modifier and Type | Field and Description |
---|---|
static char |
ANNOTATION_TAG |
static String |
ANNOTATION_TAG_VERBOSE |
static char |
ARRAY_TAG |
static String |
ARRAY_TAG_VERBOSE |
static char |
BOOL_TAG |
static String |
BOOL_TAG_VERBOSE |
static char |
BYTE_TAG |
static String |
BYTE_TAG_VERBOSE |
static char |
CHAR_TAG |
static String |
CHAR_TAG_VERBOSE |
static char |
CLASS_TAG |
static String |
CLASS_TAG_VERBOSE |
static char |
DOUBLE_TAG |
static String |
DOUBLE_TAG_VERBOSE |
static char |
ENUM_TAG |
static String |
ENUM_TAG_VERBOSE |
static char |
FLOAT_TAG |
static String |
FLOAT_TAG_VERBOSE |
protected static int |
INITIAL_LENGTH |
static char |
INT_TAG |
static String |
INT_TAG_VERBOSE |
static char |
LONG_TAG |
static String |
LONG_TAG_VERBOSE |
static char |
SHORT_TAG |
static String |
SHORT_TAG_VERBOSE |
static char |
STRING_TAG |
static String |
STRING_TAG_VERBOSE |
classFile, debug, SYSTEM_PROPERTY_DEBUG
Constructor and Description |
---|
ElementValue(int tag) |
Modifier and Type | Method and Description |
---|---|
static ElementValue |
create(DataInput in,
ClassFile classFile)
Factory for creating ElementValue structures.
|
abstract String |
getEntryName() |
int |
getLength() |
protected abstract int |
getSpecificLength() |
int |
getTag() |
static String |
getTagDescription(int tag) |
protected String |
printAccessFlagsVerbose(int accessFlags)
Utility method for derived structures.
|
void |
write(DataOutput out)
Write this structure to the given DataOutput.
|
debug, getClassFile, getDebug, getLength, printAccessFlags, printAccessFlagsVerbose, printBytes, read, setClassFile, setDebug
public static final char BYTE_TAG
public static final char CHAR_TAG
public static final char DOUBLE_TAG
public static final char FLOAT_TAG
public static final char INT_TAG
public static final char LONG_TAG
public static final char SHORT_TAG
public static final char BOOL_TAG
public static final char STRING_TAG
public static final char ENUM_TAG
public static final char CLASS_TAG
public static final char ARRAY_TAG
public static final char ANNOTATION_TAG
public static final String BYTE_TAG_VERBOSE
public static final String CHAR_TAG_VERBOSE
public static final String DOUBLE_TAG_VERBOSE
public static final String FLOAT_TAG_VERBOSE
public static final String INT_TAG_VERBOSE
public static final String LONG_TAG_VERBOSE
public static final String SHORT_TAG_VERBOSE
public static final String BOOL_TAG_VERBOSE
public static final String STRING_TAG_VERBOSE
public static final String ENUM_TAG_VERBOSE
public static final String CLASS_TAG_VERBOSE
public static final String ARRAY_TAG_VERBOSE
public static final String ANNOTATION_TAG_VERBOSE
protected static final int INITIAL_LENGTH
public static ElementValue create(DataInput in, ClassFile classFile) throws InvalidByteCodeException, IOException
in
- the DataInput from which to read the
ElementValue structureclassFile
- the parent class file of the structure to be createdInvalidByteCodeException
- 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 AbstractStructure
out
- the DataOutput to which to writeInvalidByteCodeException
- if the structure is internally inconsistentIOException
- if an exception occurs with the DataOutputprotected abstract int getSpecificLength()
public final int getLength()
public abstract String getEntryName()
protected String printAccessFlagsVerbose(int accessFlags)
AbstractStructure
printAccessFlagsVerbose
in class AbstractStructure
accessFlags
- the unsigned short value to print as a hex stringpublic int getTag()
public static String getTagDescription(int tag)