|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.ow2.asmdex.structureWriter.AnnotationSetRefList
public class AnnotationSetRefList
A Class representing an annotation_set_ref_list structure. It possesses the Annotation_set_item that EACH argument of a Method has. Dalvik handles them this way : If AT LEAST one argument of a Method is annotated, then all the arguments are stored here. The non-annotated arguments have an annotation_set_item that has a size of 0. Since all the arguments must be stored, the constructor requires the number of parameters of the Method this annotation_set_ref_list belongs. When all the parameters have been filled (which can be done in several passes, if several annotations), the annotation_set_ref_list HAS to be "closed" (through the close() method) so that empty parameters can be filled with empty annotation_set_items.
| Constructor Summary | |
|---|---|
AnnotationSetRefList(int nbParameters,
Method method)
Constructor of an annotation_set_ref_list. |
|
| Method Summary | |
|---|---|
void |
addAnnotationItem(int parameterIndex,
AnnotationItem annotationItem)
Adds an annotation_item to the given parameter. |
void |
close()
Fill the empty parameters with an empty annotation_set_item. |
boolean |
equals(java.lang.Object obj)
|
AnnotationSetItem |
getAnnotationSetItem(int parameterIndex)
Returns the annotation_set_item of the given parameter index. |
AnnotationSetItem[] |
getAnnotationSetItems()
Returns an array containing, for each parameters, an annotation_set_item. |
Method |
getMethod()
Returns the Method this structure belongs to. |
int |
getNbAnnotationSetItem()
Returns the number of annotation_set_items in the structure. |
int |
getNbAnnotationSetItemsUsed()
Returns the number of annotation_set_items that are not empty or null. |
int |
hashCode()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AnnotationSetRefList(int nbParameters,
Method method)
nbParameters - number of parameters of the Methods it belongs to (return type not included).method - the Method this annotation_set_ref_list belongs to.| Method Detail |
|---|
public void addAnnotationItem(int parameterIndex,
AnnotationItem annotationItem)
parameterIndex - the zero-based index of the parameter.annotationItem - the annotation_item to add.public void close()
public AnnotationSetItem[] getAnnotationSetItems()
public AnnotationSetItem getAnnotationSetItem(int parameterIndex)
parameterIndex - the zero-based parameter index.
public int getNbAnnotationSetItem()
public int getNbAnnotationSetItemsUsed()
public Method getMethod()
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||