This commit replaces Collections.unmodifiableList(Arrays.asList(array)) with new ImmutableArrayList<>(array), where ImmutableArrayList is a simple implementation of an immutable array-backed list. This reduces the number of allocations from 2 to 1 on many places in the code.
Additionally, this commit slightly improves javadoc of some methods in the AnnotationInstance class.
This commit replaces
Collections.unmodifiableList(Arrays.asList(array))
withnew ImmutableArrayList<>(array)
, whereImmutableArrayList
is a simple implementation of an immutable array-backed list. This reduces the number of allocations from 2 to 1 on many places in the code.Additionally, this commit slightly improves javadoc of some methods in the
AnnotationInstance
class.