Class BackedAnnotatedType<X>
- java.lang.Object
-
- org.jboss.weld.annotated.slim.BaseAnnotated
-
- org.jboss.weld.annotated.slim.backed.BackedAnnotated
-
- org.jboss.weld.annotated.slim.backed.BackedAnnotatedType<X>
-
- All Implemented Interfaces:
Serializable,Annotated,AnnotatedType<X>,Identified<AnnotatedTypeIdentifier>,SlimAnnotatedType<X>
public class BackedAnnotatedType<X> extends BackedAnnotated implements SlimAnnotatedType<X>, Serializable
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.jboss.weld.annotated.slim.SlimAnnotatedType
SlimAnnotatedType.SerializationProxy<X>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()Clear up cached content to save memory.booleanequals(Object obj)protected AnnotatedElementgetAnnotatedElement()<T extends Annotation>
TgetAnnotation(Class<T> annotationType)Get program element annotation of a certain annotation type.Set<Annotation>getAnnotations()Get all annotations of the program element.Set<AnnotatedConstructor<X>>getConstructors()Get the constructors of the type.Set<AnnotatedField<? super X>>getFields()Get the fields of the type.AnnotatedTypeIdentifiergetIdentifier()Class<X>getJavaClass()Get the underlyingClass.Set<AnnotatedMethod<? super X>>getMethods()Get the methods of the type.ReflectionCachegetReflectionCache()inthashCode()protected LazyValueHolder<Set<Type>>initTypeClosure(Type baseType, SharedObjectCache cache)booleanisAnnotationPresent(Class<? extends Annotation> annotationType)Determine if the program element has an annotation of a certain annotation type.static <X> BackedAnnotatedType<X>of(Class<X> javaClass, Type baseType, SharedObjectCache sharedObjectCache, ReflectionCache reflectionCache, String contextId, String bdaId)static <X> BackedAnnotatedType<X>of(Class<X> javaClass, Type baseType, SharedObjectCache sharedObjectCache, ReflectionCache reflectionCache, String contextId, String bdaId, String suffix)static <X> BackedAnnotatedType<X>of(Class<X> javaClass, SharedObjectCache sharedObjectCache, ReflectionCache reflectionCache, String contextId, String bdaId)StringtoString()-
Methods inherited from class org.jboss.weld.annotated.slim.backed.BackedAnnotated
getTypeClosure
-
Methods inherited from class org.jboss.weld.annotated.slim.BaseAnnotated
getBaseType
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface javax.enterprise.inject.spi.Annotated
getBaseType, getTypeClosure
-
Methods inherited from interface javax.enterprise.inject.spi.AnnotatedType
getAnnotations
-
-
-
-
Method Detail
-
of
public static <X> BackedAnnotatedType<X> of(Class<X> javaClass, SharedObjectCache sharedObjectCache, ReflectionCache reflectionCache, String contextId, String bdaId)
-
of
public static <X> BackedAnnotatedType<X> of(Class<X> javaClass, Type baseType, SharedObjectCache sharedObjectCache, ReflectionCache reflectionCache, String contextId, String bdaId)
-
of
public static <X> BackedAnnotatedType<X> of(Class<X> javaClass, Type baseType, SharedObjectCache sharedObjectCache, ReflectionCache reflectionCache, String contextId, String bdaId, String suffix)
-
initTypeClosure
protected LazyValueHolder<Set<Type>> initTypeClosure(Type baseType, SharedObjectCache cache)
- Overrides:
initTypeClosurein classBackedAnnotated
-
getAnnotatedElement
protected AnnotatedElement getAnnotatedElement()
- Specified by:
getAnnotatedElementin classBackedAnnotated
-
getJavaClass
public Class<X> getJavaClass()
Description copied from interface:AnnotatedTypeGet the underlying
Class.- Specified by:
getJavaClassin interfaceAnnotatedType<X>- Returns:
- the
Class
-
getConstructors
public Set<AnnotatedConstructor<X>> getConstructors()
Description copied from interface:AnnotatedTypeGet the constructors of the type. If an empty set is returned, a default constructor with no parameters will be assumed.
- Specified by:
getConstructorsin interfaceAnnotatedType<X>- Returns:
- the constructors, or an empty set if none are defined
-
getMethods
public Set<AnnotatedMethod<? super X>> getMethods()
Description copied from interface:AnnotatedTypeGet the methods of the type.
- Specified by:
getMethodsin interfaceAnnotatedType<X>- Returns:
- the methods, or an empty set if none are defined
-
getFields
public Set<AnnotatedField<? super X>> getFields()
Description copied from interface:AnnotatedTypeGet the fields of the type.
- Specified by:
getFieldsin interfaceAnnotatedType<X>- Returns:
- the fields, or an empty set if none are defined
-
getAnnotation
public <T extends Annotation> T getAnnotation(Class<T> annotationType)
Description copied from interface:AnnotatedGet program element annotation of a certain annotation type. The behavior of this method is intended to be the same behavior as
AnnotatedElement.getAnnotation(Class), where repeatable annotations are not supported.- Specified by:
getAnnotationin interfaceAnnotated- Type Parameters:
T- the type of the annotation- Parameters:
annotationType- the class of the annotation type- Returns:
- the first program element annotation of the given annotation type, or a null value
-
isAnnotationPresent
public boolean isAnnotationPresent(Class<? extends Annotation> annotationType)
Description copied from interface:AnnotatedDetermine if the program element has an annotation of a certain annotation type. The behavior of this method is similar to
AnnotatedElement.isAnnotationPresent(Class)for the underlying program element.- Specified by:
isAnnotationPresentin interfaceAnnotated- Parameters:
annotationType- the annotation type to check for- Returns:
- true if the program element has an annotation of the given annotation type, or false otherwise
-
getAnnotations
public Set<Annotation> getAnnotations()
Description copied from interface:AnnotatedGet all annotations of the program element.
- Specified by:
getAnnotationsin interfaceAnnotated- Overrides:
getAnnotationsin classBackedAnnotated- Returns:
- all annotations of the program element, or an empty set if no annotations are present
-
clear
public void clear()
Description copied from interface:SlimAnnotatedTypeClear up cached content to save memory. Called after bootstrap is complete.- Specified by:
clearin interfaceSlimAnnotatedType<X>
-
getReflectionCache
public ReflectionCache getReflectionCache()
- Specified by:
getReflectionCachein classBackedAnnotated
-
getIdentifier
public AnnotatedTypeIdentifier getIdentifier()
- Specified by:
getIdentifierin interfaceIdentified<X>
-
-