Class AnnotationInfoList

    • Constructor Detail

      • AnnotationInfoList

        public AnnotationInfoList()
        Construct a new modifiable empty list of AnnotationInfo objects.
      • AnnotationInfoList

        public AnnotationInfoList​(int sizeHint)
        Construct a new modifiable empty list of AnnotationInfo objects, given a size hint.
        Parameters:
        sizeHint - the size hint
      • AnnotationInfoList

        public AnnotationInfoList​(AnnotationInfoList reachableAnnotations)
        Construct a new modifiable empty AnnotationInfoList, given an initial list of AnnotationInfo objects.
        Parameters:
        reachableAnnotations - the reachable annotations
    • Method Detail

      • findReferencedClassInfo

        protected void findReferencedClassInfo​(java.util.Map<java.lang.String,​ClassInfo> classNameToClassInfo,
                                               java.util.Set<ClassInfo> refdClassInfo)
        Get ClassInfo objects for any classes referenced in this list.
        Parameters:
        classNameToClassInfo - the map from class name to ClassInfo.
        refdClassInfo - the referenced class info
      • 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.
      • getRepeatable

        public AnnotationInfoList getRepeatable​(java.lang.String name)
        Get the Repeatable annotation with the given name, or the empty list if none found.
        Parameters:
        name - The name to search for.
        Returns:
        The list of annotations with the given name, or the empty list if none found.
      • add

        public boolean add​(T element)
        Specified by:
        add in interface java.util.Collection<T>
        Specified by:
        add in interface java.util.List<T>
        Overrides:
        add in class java.util.ArrayList<T>
      • add

        public void add​(int index,
                        T element)
        Specified by:
        add in interface java.util.List<T>
        Overrides:
        add in class java.util.ArrayList<T>
      • remove

        public boolean remove​(java.lang.Object o)
        Specified by:
        remove in interface java.util.Collection<T>
        Specified by:
        remove in interface java.util.List<T>
        Overrides:
        remove in class java.util.ArrayList<T>
      • remove

        public T remove​(int index)
        Specified by:
        remove in interface java.util.List<T>
        Overrides:
        remove in class java.util.ArrayList<T>
      • addAll

        public boolean addAll​(java.util.Collection<? extends T> c)
        Specified by:
        addAll in interface java.util.Collection<T>
        Specified by:
        addAll in interface java.util.List<T>
        Overrides:
        addAll in class java.util.ArrayList<T>
      • addAll

        public boolean addAll​(int index,
                              java.util.Collection<? extends T> c)
        Specified by:
        addAll in interface java.util.List<T>
        Overrides:
        addAll in class java.util.ArrayList<T>
      • removeAll

        public boolean removeAll​(java.util.Collection<?> c)
        Specified by:
        removeAll in interface java.util.Collection<T>
        Specified by:
        removeAll in interface java.util.List<T>
        Overrides:
        removeAll in class java.util.ArrayList<T>
      • retainAll

        public boolean retainAll​(java.util.Collection<?> c)
        Specified by:
        retainAll in interface java.util.Collection<T>
        Specified by:
        retainAll in interface java.util.List<T>
        Overrides:
        retainAll in class java.util.ArrayList<T>
      • clear

        public void clear()
        Specified by:
        clear in interface java.util.Collection<T>
        Specified by:
        clear in interface java.util.List<T>
        Overrides:
        clear in class java.util.ArrayList<T>
      • set

        public T set​(int index,
                     T element)
        Specified by:
        set in interface java.util.List<T>
        Overrides:
        set in class java.util.ArrayList<T>
      • iterator

        public java.util.Iterator<T> iterator()
        Specified by:
        iterator in interface java.util.Collection<T>
        Specified by:
        iterator in interface java.lang.Iterable<T>
        Specified by:
        iterator in interface java.util.List<T>
        Overrides:
        iterator in class java.util.ArrayList<T>
      • listIterator

        public java.util.ListIterator<T> listIterator()
        Specified by:
        listIterator in interface java.util.List<T>
        Overrides:
        listIterator in class java.util.ArrayList<T>