Class AbstractEnhancedAnnotated<T,​S>

    • Constructor Detail

      • AbstractEnhancedAnnotated

        public AbstractEnhancedAnnotated​(javax.enterprise.inject.spi.Annotated annotated,
                                         Map<Class<? extends Annotation>,​Annotation> annotationMap,
                                         Map<Class<? extends Annotation>,​Annotation> declaredAnnotationMap,
                                         ClassTransformer classTransformer)
        Constructor

        Also builds the meta-annotation map. Throws a NullPointerException if trying to register a null map

        Parameters:
        annotationMap - A map of annotation to register
    • Method Detail

      • buildAnnotationMap

        protected static Map<Class<? extends Annotation>,​Annotation> buildAnnotationMap​(Annotation[] annotations)
        Builds the annotation map (annotation type -> annotation)
        Parameters:
        annotations - The array of annotations to map
        Returns:
        The annotation map
      • buildAnnotationMap

        protected static Map<Class<? extends Annotation>,​Annotation> buildAnnotationMap​(Iterable<Annotation> annotations)
        Builds the annotation map (annotation type -> annotation)
        Parameters:
        annotations - The array of annotations to map
        Returns:
        The annotation map
      • getActualTypeArguments

        public Type[] getActualTypeArguments()
        Description copied from interface: EnhancedAnnotated
        Gets the actual type arguments for any parameterized types that this AnnotatedItem represents.
        Specified by:
        getActualTypeArguments in interface EnhancedAnnotated<T,​S>
        Returns:
        An array of type arguments
      • getInterfaceClosure

        public Set<Type> getInterfaceClosure()
        Description copied from interface: EnhancedAnnotated
        Get the type hierarchy of any interfaces implemented by this class.

        The returned types should have any type parameters resolved to their actual types.

        There is no guarantee this methods executes in O(1) time

        Specified by:
        getInterfaceClosure in interface EnhancedAnnotated<T,​S>
        Returns:
        the type hierarchy
      • getDelegate

        public abstract S getDelegate()
      • getBaseType

        public Type getBaseType()
        Specified by:
        getBaseType in interface javax.enterprise.inject.spi.Annotated
      • getTypeClosure

        public Set<Type> getTypeClosure()
        Specified by:
        getTypeClosure in interface javax.enterprise.inject.spi.Annotated
      • getAnnotations

        public Set<Annotation> getAnnotations()
        Specified by:
        getAnnotations in interface javax.enterprise.inject.spi.Annotated
      • getMetaAnnotations

        public Set<Annotation> getMetaAnnotations​(Class<? extends Annotation> metaAnnotationType)
        Description copied from interface: EnhancedAnnotated
        Gets all annotations which are annotated with the given meta annotation type
        Specified by:
        getMetaAnnotations in interface EnhancedAnnotated<T,​S>
        Returns:
        A set of matching meta-annotations. Returns an empty set if there are no matches.
      • getAnnotation

        public <A extends Annotation> A getAnnotation​(Class<A> annotationType)
        Specified by:
        getAnnotation in interface javax.enterprise.inject.spi.Annotated
      • isAnnotationPresent

        public boolean isAnnotationPresent​(Class<? extends Annotation> annotationType)
        Specified by:
        isAnnotationPresent in interface javax.enterprise.inject.spi.Annotated