org.ow2.asmdex.structureWriter
Class AnnotationDirectoryItem

java.lang.Object
  extended by org.ow2.asmdex.structureWriter.AnnotationDirectoryItem

public class AnnotationDirectoryItem
extends java.lang.Object

Represents an annotation_directory_item. There can be only one maximum per Class, but a Class can have none, in case it, its methods, fields, parameters doesn't have annotations. Note that this structure is only built after all has been parsed, in order to build them easily, and find duplicates quickly, which is actually its sole purpose, the Class having already all the elements it contains.

Author:
Julien Névo

Field Summary
static int ANNOTATED_METHODS_SIZE_OFFSET
          Offset in bytes of the annotated_methods_size field in the annotations_directory_item structure.
static int ANNOTATED_PARAMETERS_SIZE_OFFSET
          Offset in bytes of the annotated_parameters_size field in the annotations_directory_item structure.
static int CLASS_ANNOTATIONS_OFF_OFFSET
          Offset in bytes of the class_annotations_off field in the annotations_directory_item structure.
static int FIELDS_SIZE_OFFSET
          Offset in bytes of the fields_size field in the annotations_directory_item structure.
 
Constructor Summary
AnnotationDirectoryItem()
           
 
Method Summary
 void addAnnotatedField(Field field)
          Adds an Annotated Field to the directory.
 void addAnnotatedMethods(Method method)
          Adds an Annotated Method to the directory.
 void addAnnotatedParameter(AnnotationSetRefList parameter)
          Adds an Annotated Parameter to the directory.
 boolean equals(java.lang.Object obj)
           
 java.util.List<Field> getAnnotatedFields()
          Returns the Annotated Fields.
 java.util.List<Method> getAnnotatedMethods()
          Returns the Annotated Methods.
 java.util.List<AnnotationSetRefList> getAnnotatedParameters()
          Returns the Annotated Parameters.
 AnnotationSetItem getClassAnnotationSetItem()
          Returns the Class Annotation Set Item.
 int getNbAnnotatedFields()
          Returns the number of Annotated Fields.
 int getNbAnnotatedMethods()
          Returns the number of Annotated Methods.
 int getNbAnnotatedParameters()
          Returns the number of Annotated Parameters.
 int hashCode()
           
 void setClassAnnotationSetItem(AnnotationSetItem classAnnotations)
          Sets the Class Annotation Set Item.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_ANNOTATIONS_OFF_OFFSET

public static final int CLASS_ANNOTATIONS_OFF_OFFSET
Offset in bytes of the class_annotations_off field in the annotations_directory_item structure.

See Also:
Constant Field Values

FIELDS_SIZE_OFFSET

public static final int FIELDS_SIZE_OFFSET
Offset in bytes of the fields_size field in the annotations_directory_item structure.

See Also:
Constant Field Values

ANNOTATED_METHODS_SIZE_OFFSET

public static final int ANNOTATED_METHODS_SIZE_OFFSET
Offset in bytes of the annotated_methods_size field in the annotations_directory_item structure.

See Also:
Constant Field Values

ANNOTATED_PARAMETERS_SIZE_OFFSET

public static final int ANNOTATED_PARAMETERS_SIZE_OFFSET
Offset in bytes of the annotated_parameters_size field in the annotations_directory_item structure.

See Also:
Constant Field Values
Constructor Detail

AnnotationDirectoryItem

public AnnotationDirectoryItem()
Method Detail

setClassAnnotationSetItem

public void setClassAnnotationSetItem(AnnotationSetItem classAnnotations)
Sets the Class Annotation Set Item.


getClassAnnotationSetItem

public AnnotationSetItem getClassAnnotationSetItem()
Returns the Class Annotation Set Item.

Returns:
the Class Annotation Set Item.

getAnnotatedFields

public java.util.List<Field> getAnnotatedFields()
Returns the Annotated Fields.

Returns:
the Annotated Fields.

getAnnotatedMethods

public java.util.List<Method> getAnnotatedMethods()
Returns the Annotated Methods.

Returns:
the Annotated Methods.

getAnnotatedParameters

public java.util.List<AnnotationSetRefList> getAnnotatedParameters()
Returns the Annotated Parameters.

Returns:
the Annotated Parameters.

getNbAnnotatedFields

public int getNbAnnotatedFields()
Returns the number of Annotated Fields.

Returns:
the number of Annotated Fields.

getNbAnnotatedMethods

public int getNbAnnotatedMethods()
Returns the number of Annotated Methods.

Returns:
the number of Annotated Methods.

getNbAnnotatedParameters

public int getNbAnnotatedParameters()
Returns the number of Annotated Parameters.

Returns:
the number of Annotated Parameters.

addAnnotatedField

public void addAnnotatedField(Field field)
Adds an Annotated Field to the directory.


addAnnotatedMethods

public void addAnnotatedMethods(Method method)
Adds an Annotated Method to the directory.


addAnnotatedParameter

public void addAnnotatedParameter(AnnotationSetRefList parameter)
Adds an Annotated Parameter to the directory.


equals

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

hashCode

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