ej-technologies

org.gjt.jclasslib.structures.elementvalues
Class AnnotationElementValue

java.lang.Object
  extended byorg.gjt.jclasslib.structures.AbstractStructure
      extended byorg.gjt.jclasslib.structures.elementvalues.ElementValue
          extended byorg.gjt.jclasslib.structures.elementvalues.AnnotationElementValue

public class AnnotationElementValue
extends ElementValue

Describes an Annotation attribute structure.

Version:
$Revision: 1.1 $ $Date: 2004/12/28 13:04:32 $
Author:
Vitor Carreira

Field Summary
static String ENTRY_NAME
           
 
Fields inherited from class org.gjt.jclasslib.structures.elementvalues.ElementValue
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, INT_TAG, INT_TAG_VERBOSE, LONG_TAG, LONG_TAG_VERBOSE, SHORT_TAG, SHORT_TAG_VERBOSE, STRING_TAG, STRING_TAG_VERBOSE
 
Fields inherited from class org.gjt.jclasslib.structures.AbstractStructure
classFile, debug, SYSTEM_PROPERTY_DEBUG
 
Constructor Summary
AnnotationElementValue()
           
 
Method Summary
protected  void debug(String message)
          Utility method for derived structures.
 ElementValuePair[] getElementValuePairEntries()
          Get the list of element value pair associations of the parent structure as an array of ElementValuePair structures.
 String getEntryName()
           
protected  int getSpecificLength()
           
 int getTypeIndex()
          Get the type_index of this annotation.
 void read(DataInput in)
          Read this structure from the given DataInput.
 void setElementValuePairEntries(ElementValuePair[] elementValuePairEntries)
          Set the list of element value pair associations of the parent structure as an array of ElementValuePair structures.
 void setTypeIndex(int typeIndex)
          Set the type_index of this annotation.
 void write(DataOutput out)
          Write this structure to the given DataOutput.
 
Methods inherited from class org.gjt.jclasslib.structures.elementvalues.ElementValue
create, getLength, getTag, getTagDescription, printAccessFlagsVerbose
 
Methods inherited from class org.gjt.jclasslib.structures.AbstractStructure
getClassFile, getDebug, getLength, printAccessFlags, printAccessFlagsVerbose, printBytes, setClassFile, setDebug
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ENTRY_NAME

public static final String ENTRY_NAME
See Also:
Constant Field Values
Constructor Detail

AnnotationElementValue

public AnnotationElementValue()
Method Detail

getEntryName

public String getEntryName()
Specified by:
getEntryName in class ElementValue

getElementValuePairEntries

public ElementValuePair[] getElementValuePairEntries()
Get the list of element value pair associations of the parent structure as an array of ElementValuePair structures.

Returns:
the array

setElementValuePairEntries

public void setElementValuePairEntries(ElementValuePair[] elementValuePairEntries)
Set the list of element value pair associations of the parent structure as an array of ElementValuePair structures.

Parameters:
elementValuePairEntries - the array

getTypeIndex

public int getTypeIndex()
Get the type_index of this annotation.

Returns:
the type_index

setTypeIndex

public void setTypeIndex(int typeIndex)
Set the type_index of this annotation.

Parameters:
typeIndex - the type_index

read

public void read(DataInput in)
          throws InvalidByteCodeException,
                 IOException
Description copied from class: AbstractStructure
Read this structure from the given DataInput.

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.

Overrides:
read in class AbstractStructure
Parameters:
in - the DataInput from which to read
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 ElementValue
Throws:
InvalidByteCodeException
IOException

getSpecificLength

protected int getSpecificLength()
Specified by:
getSpecificLength in class ElementValue

debug

protected void debug(String message)
Description copied from class: AbstractStructure
Utility method for derived structures. Dump a specific debug message.

Overrides:
debug in class AbstractStructure
Parameters:
message - the debug message

ej-technologies