Class AnnotationList.Empty

    • Constructor Detail

      • Empty

        public Empty()
    • Method Detail

      • asList

        public static java.util.List<AnnotationList> asList​(int length)
        Creates a list of empty annotation lists of the given dimension.
        Parameters:
        length - The length of the list.
        Returns:
        A list of empty annotation lists of the given length.
      • isAnnotationPresent

        public boolean isAnnotationPresent​(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
        Checks if this list contains an annotation of the given type.
        Specified by:
        isAnnotationPresent in interface AnnotationList
        Parameters:
        annotationType - The type to find in the list.
        Returns:
        true if the list contains the annotation type.
      • isAnnotationPresent

        public boolean isAnnotationPresent​(TypeDescription annotationType)
        Checks if this list contains an annotation of the given type.
        Specified by:
        isAnnotationPresent in interface AnnotationList
        Parameters:
        annotationType - The type to find in the list.
        Returns:
        true if the list contains the annotation type.
      • ofType

        public <T extends java.lang.annotation.Annotation> AnnotationDescription.Loadable<T> ofType​(java.lang.Class<T> annotationType)
        Finds the first annotation of the given type and returns it.
        Specified by:
        ofType in interface AnnotationList
        Type Parameters:
        T - The annotation type.
        Parameters:
        annotationType - The type to be found in the list.
        Returns:
        The annotation description or null if no such annotation was found.
      • ofType

        public AnnotationDescription ofType​(TypeDescription annotationType)
        Finds the first annotation of the given type and returns it.
        Specified by:
        ofType in interface AnnotationList
        Parameters:
        annotationType - The type to be found in the list.
        Returns:
        The annotation description or null if no such annotation was found.
      • inherited

        public AnnotationList inherited​(java.util.Set<? extends TypeDescription> ignoredTypes)
        Returns only annotations that are marked as Inherited as long as they are not contained by the set of ignored annotation types.
        Specified by:
        inherited in interface AnnotationList
        Parameters:
        ignoredTypes - A list of annotation types to be ignored from the lookup.
        Returns:
        A list of all inherited annotations besides of the given ignored types.
      • visibility

        public AnnotationList visibility​(ElementMatcher<? super java.lang.annotation.RetentionPolicy> matcher)
        Only retains annotations with the given retention policy.
        Specified by:
        visibility in interface AnnotationList
        Parameters:
        matcher - A matcher for the required retention policy.
        Returns:
        A of annotations only with elements
      • asTypeList

        public TypeList asTypeList()
        Returns a list of the annotation types of this list.
        Specified by:
        asTypeList in interface AnnotationList
        Returns:
        A list of the annotation types of this list.