Package com.android.dx.rop.annotation
Class AnnotationsList
java.lang.Object
com.android.dx.util.MutabilityControl
com.android.dx.util.FixedSizeList
com.android.dx.rop.annotation.AnnotationsList
- All Implemented Interfaces:
ToHuman
List of
Annotations
instances.-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic AnnotationsList
combine
(AnnotationsList list1, AnnotationsList list2) Constructs an immutable instance which is the combination of the two given instances.get
(int n) Gets the element at the given index.void
set
(int n, Annotations a) Sets the element at the given index.Methods inherited from class com.android.dx.util.FixedSizeList
equals, get0, getOrNull0, hashCode, set0, shrinkToFit, size, toHuman, toHuman, toString, toString
Methods inherited from class com.android.dx.util.MutabilityControl
isImmutable, isMutable, setImmutable, throwIfImmutable, throwIfMutable
-
Field Details
-
EMPTY
non-null;
immutable empty instance
-
-
Constructor Details
-
AnnotationsList
public AnnotationsList(int size) Constructs an instance. All indices initially containnull
.- Parameters:
size
- the size of the list
-
-
Method Details
-
combine
Constructs an immutable instance which is the combination of the two given instances. The two instances must each have the same number of elements, and each pair of elements must contain disjoint sets of types.- Parameters:
list1
-non-null;
an instancelist2
-non-null;
the other instance- Returns:
non-null;
the combination
-
get
Gets the element at the given index. It is an error to call this with the index for an element which was never set; if you do that, this will throwNullPointerException
.- Parameters:
n
->= 0, < size();
which index- Returns:
non-null;
element at that index
-
set
Sets the element at the given index. The given element must be immutable.- Parameters:
n
->= 0, < size();
which indexa
-null-ok;
the element to set atn
-