org.gjt.jclasslib.structures.elementvalues
Class ElementValue
java.lang.Object
org.gjt.jclasslib.structures.AbstractStructure
org.gjt.jclasslib.structures.elementvalues.ElementValue
- Direct Known Subclasses:
- AnnotationElementValue, ArrayElementValue, ClassElementValue, ConstElementValue, EnumElementValue
- public abstract class ElementValue
- extends AbstractStructure
Describes an ElementValue attribute structure.
- Version:
- $Revision: 1.1 $ $Date: 2004/12/28 13:04:32 $
- Author:
- Vitor Carreira
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BYTE_TAG
public static final char BYTE_TAG
- See Also:
- Constant Field Values
CHAR_TAG
public static final char CHAR_TAG
- See Also:
- Constant Field Values
DOUBLE_TAG
public static final char DOUBLE_TAG
- See Also:
- Constant Field Values
FLOAT_TAG
public static final char FLOAT_TAG
- See Also:
- Constant Field Values
INT_TAG
public static final char INT_TAG
- See Also:
- Constant Field Values
LONG_TAG
public static final char LONG_TAG
- See Also:
- Constant Field Values
SHORT_TAG
public static final char SHORT_TAG
- See Also:
- Constant Field Values
BOOL_TAG
public static final char BOOL_TAG
- See Also:
- Constant Field Values
STRING_TAG
public static final char STRING_TAG
- See Also:
- Constant Field Values
ENUM_TAG
public static final char ENUM_TAG
- See Also:
- Constant Field Values
CLASS_TAG
public static final char CLASS_TAG
- See Also:
- Constant Field Values
ARRAY_TAG
public static final char ARRAY_TAG
- See Also:
- Constant Field Values
ANNOTATION_TAG
public static final char ANNOTATION_TAG
- See Also:
- Constant Field Values
BYTE_TAG_VERBOSE
public static final String BYTE_TAG_VERBOSE
- See Also:
- Constant Field Values
CHAR_TAG_VERBOSE
public static final String CHAR_TAG_VERBOSE
- See Also:
- Constant Field Values
DOUBLE_TAG_VERBOSE
public static final String DOUBLE_TAG_VERBOSE
- See Also:
- Constant Field Values
FLOAT_TAG_VERBOSE
public static final String FLOAT_TAG_VERBOSE
- See Also:
- Constant Field Values
INT_TAG_VERBOSE
public static final String INT_TAG_VERBOSE
- See Also:
- Constant Field Values
LONG_TAG_VERBOSE
public static final String LONG_TAG_VERBOSE
- See Also:
- Constant Field Values
SHORT_TAG_VERBOSE
public static final String SHORT_TAG_VERBOSE
- See Also:
- Constant Field Values
BOOL_TAG_VERBOSE
public static final String BOOL_TAG_VERBOSE
- See Also:
- Constant Field Values
STRING_TAG_VERBOSE
public static final String STRING_TAG_VERBOSE
- See Also:
- Constant Field Values
ENUM_TAG_VERBOSE
public static final String ENUM_TAG_VERBOSE
- See Also:
- Constant Field Values
CLASS_TAG_VERBOSE
public static final String CLASS_TAG_VERBOSE
- See Also:
- Constant Field Values
ARRAY_TAG_VERBOSE
public static final String ARRAY_TAG_VERBOSE
- See Also:
- Constant Field Values
ANNOTATION_TAG_VERBOSE
public static final String ANNOTATION_TAG_VERBOSE
- See Also:
- Constant Field Values
INITIAL_LENGTH
protected static final int INITIAL_LENGTH
- See Also:
- Constant Field Values
ElementValue
public ElementValue(int tag)
create
public static ElementValue create(DataInput in,
ClassFile classFile)
throws InvalidByteCodeException,
IOException
- Factory for creating ElementValue structures.
- Parameters:
in
- the DataInput from which to read the
ElementValue structureclassFile
- the parent class file of the structure to be created
- Returns:
- the new ElementValue structure
- Throws:
InvalidByteCodeException
- if the byte code is invalid
IOException
- if an exception occurs with the DataInput
write
public void write(DataOutput out)
throws InvalidByteCodeException,
IOException
- Description copied from class:
AbstractStructure
- Write this structure to the given DataOutput.
The written bytes are in JVM class file format.
- Overrides:
write
in class AbstractStructure
- Parameters:
out
- the DataOutput to which to write
- Throws:
IOException
- if an exception occurs with the DataOutput
InvalidByteCodeException
- if the structure is internally inconsistent
getSpecificLength
protected abstract int getSpecificLength()
getLength
public final int getLength()
getEntryName
public abstract String getEntryName()
printAccessFlagsVerbose
protected String printAccessFlagsVerbose(int accessFlags)
- Description copied from class:
AbstractStructure
- Utility method for derived structures. Print an access flag as
a space separated list of verbose java access modifiers.
- Specified by:
printAccessFlagsVerbose
in class AbstractStructure
- Parameters:
accessFlags
- the unsigned short value to print as a hex string
- Returns:
- the hex string
getTag
public int getTag()
getTagDescription
public static String getTagDescription(int tag)