Class EnhancedAnnotationImpl<T extends Annotation>
- java.lang.Object
-
- org.jboss.weld.annotated.enhanced.jlr.AbstractEnhancedAnnotated<T,Class<T>>
-
- org.jboss.weld.annotated.enhanced.jlr.EnhancedAnnotatedTypeImpl<T>
-
- org.jboss.weld.annotated.enhanced.jlr.EnhancedAnnotationImpl<T>
-
- Type Parameters:
T
-
- All Implemented Interfaces:
jakarta.enterprise.inject.spi.Annotated
,jakarta.enterprise.inject.spi.AnnotatedType<T>
,EnhancedAnnotated<T,Class<T>>
,EnhancedAnnotatedType<T>
,EnhancedAnnotation<T>
public class EnhancedAnnotationImpl<T extends Annotation> extends EnhancedAnnotatedTypeImpl<T> implements EnhancedAnnotation<T>
Represents an annotated annotation This class is immutable and therefore threadsafe- Author:
- Pete Muir
-
-
Field Summary
-
Fields inherited from interface org.jboss.weld.annotated.enhanced.EnhancedAnnotated
MAPPED_DECLARED_METAANNOTATIONS, MAPPED_METAANNOTATIONS
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
EnhancedAnnotationImpl(SlimAnnotatedType<T> annotatedType, Map<Class<? extends Annotation>,Annotation> annotationMap, Map<Class<? extends Annotation>,Annotation> declaredAnnotationMap, ClassTransformer classTransformer)
Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <A extends Annotation>
EnhancedAnnotation<A>create(SlimAnnotatedType<A> annotatedType, ClassTransformer classTransformer)
boolean
equals(Object obj)
Class<T>
getDelegate()
Gets the delegate (class)Set<EnhancedAnnotatedMethod<?,?>>
getMembers()
Gets all members of the annotationSet<EnhancedAnnotatedMethod<?,?>>
getMembers(Class<? extends Annotation> annotationType)
Returns the annotated members with a given annotation typeprotected Set<EnhancedAnnotatedMethod<?,? super T>>
getOverriddenMethods(EnhancedAnnotatedType<T> annotatedType, Set<EnhancedAnnotatedMethod<?,? super T>> methods, boolean skipOverridingBridgeMethods)
int
hashCode()
String
toString()
Gets a string representation of the annotation-
Methods inherited from class org.jboss.weld.annotated.enhanced.jlr.EnhancedAnnotatedTypeImpl
asEnhancedSubclass, buildAnnotatedMethodMultimap, buildAnnotatedParameterMethodMultimap, cast, getAnnotatedClass, getConstructors, getDeclaredEnhancedConstructor, getDeclaredEnhancedField, getDeclaredEnhancedFields, getDeclaredEnhancedFields, getDeclaredEnhancedMethod, getDeclaredEnhancedMethods, getDeclaredEnhancedMethods, getDeclaredEnhancedMethodsWithAnnotatedParameters, getDeclaredMetaAnnotations, getEnhancedConstructors, getEnhancedConstructors, getEnhancedFields, getEnhancedFields, getEnhancedMethod, getEnhancedMethods, getEnhancedMethods, getEnhancedMethodsWithAnnotatedParameters, getEnhancedSuperclass, getFields, getMethods, getName, getNoArgsEnhancedConstructor, getOverriddenMethods, getPackage, getSimpleName, isAbstract, isAnonymousClass, isDiscovered, isEnum, isEquivalent, isFinal, isGeneric, isLocalClass, isMemberClass, isPackagePrivate, isPrivate, isPublic, isSerializable, isStatic, of, slim
-
Methods inherited from class org.jboss.weld.annotated.enhanced.jlr.AbstractEnhancedAnnotated
addMetaAnnotations, buildAnnotationMap, getActualTypeArguments, getAnnotation, getAnnotations, getBaseType, getBindingsAsArray, getInterfaceClosure, getJavaClass, getMetaAnnotations, getQualifiers, getTypeClosure, isAnnotationPresent, isParameterizedType, isPrimitive, processMetaAnnotations, processMetaAnnotations, processMetaAnnotations
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface jakarta.enterprise.inject.spi.Annotated
getAnnotation, getAnnotations, getBaseType, getTypeClosure, isAnnotationPresent
-
Methods inherited from interface jakarta.enterprise.inject.spi.AnnotatedType
getAnnotations, getConstructors, getFields, getJavaClass, getMethods
-
Methods inherited from interface org.jboss.weld.annotated.enhanced.EnhancedAnnotated
getActualTypeArguments, getBindingsAsArray, getInterfaceClosure, getJavaClass, getMetaAnnotations, getName, getPackage, getQualifiers, isFinal, isGeneric, isPackagePrivate, isPrimitive, isPrivate, isPublic, isStatic
-
Methods inherited from interface org.jboss.weld.annotated.enhanced.EnhancedAnnotatedType
asEnhancedSubclass, cast, getDeclaredEnhancedConstructor, getDeclaredEnhancedField, getDeclaredEnhancedFields, getDeclaredEnhancedFields, getDeclaredEnhancedMethod, getDeclaredEnhancedMethods, getDeclaredEnhancedMethods, getDeclaredEnhancedMethodsWithAnnotatedParameters, getDeclaredMetaAnnotations, getEnhancedConstructors, getEnhancedConstructors, getEnhancedFields, getEnhancedFields, getEnhancedMethod, getEnhancedMethods, getEnhancedMethods, getEnhancedMethodsWithAnnotatedParameters, getEnhancedSuperclass, getNoArgsEnhancedConstructor, getSimpleName, isAbstract, isAnonymousClass, isDiscovered, isEnum, isEquivalent, isLocalClass, isMemberClass, isParameterizedType, isSerializable, slim
-
-
-
-
Constructor Detail
-
EnhancedAnnotationImpl
protected EnhancedAnnotationImpl(SlimAnnotatedType<T> annotatedType, Map<Class<? extends Annotation>,Annotation> annotationMap, Map<Class<? extends Annotation>,Annotation> declaredAnnotationMap, ClassTransformer classTransformer)
Constructor Initializes the superclass with the built annotation map- Parameters:
annotationType
- The annotation type
-
-
Method Detail
-
create
public static <A extends Annotation> EnhancedAnnotation<A> create(SlimAnnotatedType<A> annotatedType, ClassTransformer classTransformer)
-
getOverriddenMethods
protected Set<EnhancedAnnotatedMethod<?,? super T>> getOverriddenMethods(EnhancedAnnotatedType<T> annotatedType, Set<EnhancedAnnotatedMethod<?,? super T>> methods, boolean skipOverridingBridgeMethods)
- Overrides:
getOverriddenMethods
in classEnhancedAnnotatedTypeImpl<T extends Annotation>
skipOverridingBridgeMethods
- If set totrue
the returning set will not contain methods overriden by a bridge method- Returns:
- the set of overriden methods
-
getMembers
public Set<EnhancedAnnotatedMethod<?,?>> getMembers()
Gets all members of the annotation Initializes the members first if they are null- Specified by:
getMembers
in interfaceEnhancedAnnotation<T extends Annotation>
- Returns:
- The set of abstracted members
- See Also:
EnhancedAnnotation.getMembers()
-
getMembers
public Set<EnhancedAnnotatedMethod<?,?>> getMembers(Class<? extends Annotation> annotationType)
Returns the annotated members with a given annotation type If the annotated members are null, they are initialized first.- Specified by:
getMembers
in interfaceEnhancedAnnotation<T extends Annotation>
- Parameters:
annotationType
- The annotation type to match- Returns:
- The set of abstracted members with the given annotation type present. An empty set is returned if no matches are found
- See Also:
EnhancedAnnotation.getMembers(Class)
-
toString
public String toString()
Gets a string representation of the annotation- Overrides:
toString
in classEnhancedAnnotatedTypeImpl<T extends Annotation>
- Returns:
- A string representation
-
getDelegate
public Class<T> getDelegate()
Description copied from class:EnhancedAnnotatedTypeImpl
Gets the delegate (class)- Overrides:
getDelegate
in classEnhancedAnnotatedTypeImpl<T extends Annotation>
- Returns:
- The class
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classEnhancedAnnotatedTypeImpl<T extends Annotation>
-
equals
public boolean equals(Object obj)
- Overrides:
equals
in classEnhancedAnnotatedTypeImpl<T extends Annotation>
-
-