org.ow2.asmdex.encodedValue
Class EncodedValueAnnotation

java.lang.Object
  extended by org.ow2.asmdex.encodedValue.EncodedValue
      extended by org.ow2.asmdex.encodedValue.EncodedValueAnnotation
All Implemented Interfaces:
java.lang.Comparable<EncodedValue>

public class EncodedValueAnnotation
extends EncodedValue

Class representing an Encoded Value containing an Annotation. Annotation Element can then be added to the Annotation.

Author:
Julien Névo

Constructor Summary
EncodedValueAnnotation(java.lang.Object annotationType)
          Constructs the Encoded Annotation, empty for now.
EncodedValueAnnotation(java.lang.String annotationType)
          Constructs the Encoded Annotation, empty for now.
 
Method Summary
 void addAnnotationElement(AnnotationElement annotationElement)
          Adds an Annotation Element to the Annotation.
 byte[] encode(ConstantPool constantPool)
          Returns the bytes of the Encoded Value.
 boolean equals(java.lang.Object o)
           
 java.util.ArrayList<AnnotationElement> getAnnotationElements()
          Returns the AnnotationElements this EncodedValue contains.
 java.lang.String getAnnotationType()
          Returns the type of the Annotation.
 int getType()
          Returns the Type of an Encoded Value (see Opcodes).
 int hashCode()
           
 
Methods inherited from class org.ow2.asmdex.encodedValue.EncodedValue
compareTo
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EncodedValueAnnotation

public EncodedValueAnnotation(java.lang.String annotationType)
Constructs the Encoded Annotation, empty for now. The Annotation Element must be entered one by one.

Parameters:
annotationType - the type of the Annotation.

EncodedValueAnnotation

public EncodedValueAnnotation(java.lang.Object annotationType)
Constructs the Encoded Annotation, empty for now. The Annotation Element must be entered one by one.

Parameters:
annotationType - the type of the Annotation.
Method Detail

addAnnotationElement

public void addAnnotationElement(AnnotationElement annotationElement)
Adds an Annotation Element to the Annotation.

Parameters:
annotationElement - the Annotation Element to add.

encode

public byte[] encode(ConstantPool constantPool)
Description copied from class: EncodedValue
Returns the bytes of the Encoded Value.

Specified by:
encode in class EncodedValue
Parameters:
constantPool - the Constant Pool.
Returns:
the bytes of the Encoded Value.

getType

public int getType()
Description copied from class: EncodedValue
Returns the Type of an Encoded Value (see Opcodes).

Specified by:
getType in class EncodedValue
Returns:
the Type of an Encoded Value.

getAnnotationType

public java.lang.String getAnnotationType()
Returns the type of the Annotation.

Returns:
the type of the Annotation.

getAnnotationElements

public java.util.ArrayList<AnnotationElement> getAnnotationElements()
Returns the AnnotationElements this EncodedValue contains.

Returns:
the AnnotationElements.

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object