AnnotationsListpublic final class AnnotationsList extends com.android.dx.util.FixedSizeList List of {@link Annotations} instances. |
Fields Summary |
---|
public static final AnnotationsList | EMPTY{@code non-null;} immutable empty instance |
Constructors Summary |
---|
public AnnotationsList(int size)Constructs an instance. All indices initially contain {@code null}.
super(size);
|
Methods Summary |
---|
public static com.android.dx.rop.annotation.AnnotationsList | combine(com.android.dx.rop.annotation.AnnotationsList list1, com.android.dx.rop.annotation.AnnotationsList list2)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.
int size = list1.size();
if (size != list2.size()) {
throw new IllegalArgumentException("list1.size() != list2.size()");
}
AnnotationsList result = new AnnotationsList(size);
for (int i = 0; i < size; i++) {
Annotations a1 = list1.get(i);
Annotations a2 = list2.get(i);
result.set(i, Annotations.combine(a1, a2));
}
result.setImmutable();
return result;
| public Annotations | get(int n)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 throw {@code NullPointerException}.
return (Annotations) get0(n);
| public void | set(int n, Annotations a)Sets the element at the given index. The given element must be
immutable.
a.throwIfMutable();
set0(n, a);
|
|