Package org.apache.juneau.reflect
Class AnnotationList
- All Implemented Interfaces:
- Serializable,- Cloneable,- Iterable<AnnotationInfo<?>>,- Collection<AnnotationInfo<?>>,- List<AnnotationInfo<?>>,- RandomAccess
An ordered list of annotations and the classes/methods/packages they were found on.
 
See Also:
- 
Field SummaryFields inherited from class java.util.AbstractListmodCount
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescription<A extends Annotation>
 AnnotationListforEach(Class<A> type, Predicate<AnnotationInfo<A>> filter, Consumer<AnnotationInfo<A>> action) Performs an action on all matching annotations in this list.<A extends Annotation>
 AnnotationListforEach(Predicate<AnnotationInfo<?>> filter, Consumer<AnnotationInfo<?>> action) Performs an action on all matching annotations in this list.<T> AnnotationListforEachValue(Class<T> type, String name, Predicate<T> filter, Consumer<T> action) Performs an action on the specified matching values from all annotations in this list.sort()Sort the annotations in this list based on rank.Methods inherited from class java.util.ArrayListadd, add, addAll, addAll, clear, clone, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSizeMethods inherited from class java.util.AbstractCollectioncontainsAll, toStringMethods inherited from class java.lang.Objectfinalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.CollectionparallelStream, stream, toArrayMethods inherited from interface java.util.ListcontainsAll
- 
Constructor Details- 
AnnotationListpublic AnnotationList()
 
- 
- 
Method Details- 
sortSort the annotations in this list based on rank.- Returns:
- This object.
 
- 
forEachValuepublic <T> AnnotationList forEachValue(Class<T> type, String name, Predicate<T> filter, Consumer<T> action) Performs an action on the specified matching values from all annotations in this list.- Type Parameters:
- T- The annotation value type.
- Parameters:
- type- The annotation value type.
- name- The annotation value name.
- filter- A predicate to apply to the value to determine if action should be performed. Can be- null .
- action- An action to perform on the value.
- Returns:
- This object.
 
- 
forEachpublic <A extends Annotation> AnnotationList forEach(Class<A> type, Predicate<AnnotationInfo<A>> filter, Consumer<AnnotationInfo<A>> action) Performs an action on all matching annotations in this list.- Type Parameters:
- A- The annotation type.
- Parameters:
- type- The annotation type.
- filter- A predicate to apply to the entries to determine if action should be performed. Can be- null .
- action- An action to perform on the entry.
- Returns:
- This object.
 
- 
forEachpublic <A extends Annotation> AnnotationList forEach(Predicate<AnnotationInfo<?>> filter, Consumer<AnnotationInfo<?>> action) Performs an action on all matching annotations in this list.- Type Parameters:
- A- The annotation type.
- Parameters:
- filter- A predicate to apply to the entries to determine if action should be performed. Can be- null .
- action- An action to perform on the entry.
- Returns:
- This object.
 
 
-