Class AnnotationInfoList

    • Field Summary

      • Fields inherited from class java.util.AbstractList

        modCount
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Map<java.lang.String,​T> asMap()  
      boolean containsName​(java.lang.String name)  
      AnnotationInfoList directOnly()
      returns the list of direct annotations, excluding meta-annotations.
      AnnotationInfoList filter​(AnnotationInfoList.AnnotationInfoFilter filter)
      Find the subset of the AnnotationInfo objects in this list for which the given filter predicate is true.
      T get​(java.lang.String name)  
      java.util.List<java.lang.String> getAsStrings()  
      java.util.List<java.lang.String> getNames()  
      • Methods inherited from class java.util.ArrayList

        add, 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, trimToSize
      • Methods inherited from class java.util.AbstractCollection

        containsAll, toString
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Collection

        parallelStream, stream, toArray
      • Methods inherited from interface java.util.List

        containsAll
    • Method Detail

      • directOnly

        public AnnotationInfoList directOnly()
        returns the list of direct annotations, excluding meta-annotations. If this AnnotationInfoList consists of class annotations, i.e. if it was produced using `ClassInfo#getAnnotationInfo()`, then the returned list also excludes annotations inherited from a superclass or implemented interface that was meta-annotated with @Inherited.
        Returns:
        The list of directly-related annotations.
      • asMap

        public java.util.Map<java.lang.String,​T> asMap()
        Returns:
        An index for this list, as a map from the name of each list item (obtained by calling getName on the list item) to the list item.
      • containsName

        public boolean containsName​(java.lang.String name)
        Parameters:
        name - The name to search for.
        Returns:
        true if this list contains an item with the given name.
      • get

        public T get​(java.lang.String name)
        Parameters:
        name - The name to search for.
        Returns:
        The list item with the given name, or null if not found.
      • getNames

        public java.util.List<java.lang.String> getNames()
        Returns:
        The names of all packages in this list, by calling PackageInfo.getName() for each item in the list.
      • getAsStrings

        public java.util.List<java.lang.String> getAsStrings()
        Returns:
        The string representations of all items in this list, obtained by calling toString() on each item in the list.