|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.android.dx.util.MutabilityControl
com.android.dx.rop.annotation.Annotations
public final class Annotations
List of Annotation instances.
| Field Summary | |
|---|---|
static Annotations |
EMPTY
non-null; immutable empty instance |
| Constructor Summary | |
|---|---|
Annotations()
Constructs an empty instance. |
|
| Method Summary | |
|---|---|
void |
add(Annotation annotation)
Adds an element to this instance. |
void |
addAll(Annotations toAdd)
Adds all of the elements of the given instance to this one. |
static Annotations |
combine(Annotations annotations,
Annotation annotation)
Constructs an immutable instance which is the combination of the given instance with the given additional annotation. |
static Annotations |
combine(Annotations a1,
Annotations a2)
Constructs an immutable instance which is the combination of the two given instances. |
int |
compareTo(Annotations other)
|
boolean |
equals(Object other)
|
Collection<Annotation> |
getAnnotations()
Gets the set of annotations contained in this instance. |
int |
hashCode()
|
int |
size()
Gets the number of elements in this instance. |
String |
toString()
|
| Methods inherited from class com.android.dx.util.MutabilityControl |
|---|
isImmutable, isMutable, setImmutable, throwIfImmutable, throwIfMutable |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final Annotations EMPTY
non-null; immutable empty instance
| Constructor Detail |
|---|
public Annotations()
| Method Detail |
|---|
public static Annotations combine(Annotations a1,
Annotations a2)
a1 - non-null; an instancea2 - non-null; the other instance
non-null; the combination
IllegalArgumentException - thrown if there is a duplicate type
public static Annotations combine(Annotations annotations,
Annotation annotation)
annotations - non-null; the instance to augmentannotation - non-null; the additional annotation
non-null; the combination
IllegalArgumentException - thrown if there is a duplicate typepublic int hashCode()
hashCode in class Objectpublic boolean equals(Object other)
equals in class Objectpublic int compareTo(Annotations other)
compareTo in interface Comparable<Annotations>public String toString()
toString in class Objectpublic int size()
>= 0; the sizepublic void add(Annotation annotation)
annotation - non-null; the element to add
IllegalArgumentException - thrown if there is a duplicate typepublic void addAll(Annotations toAdd)
toAdd - non-null; the annotations to add
IllegalArgumentException - thrown if there is a duplicate typepublic Collection<Annotation> getAnnotations()
non-null; the set of annotations
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||