Package org.jboss.weld.util.annotated
Class ForwardingWeldClass<T>
- java.lang.Object
-
- org.jboss.weld.util.annotated.ForwardingAnnotated
-
- org.jboss.weld.util.annotated.ForwardingWeldAnnotated<T,Class<T>>
-
- org.jboss.weld.util.annotated.ForwardingWeldClass<T>
-
- All Implemented Interfaces:
javax.enterprise.inject.spi.Annotated,javax.enterprise.inject.spi.AnnotatedType<T>,EnhancedAnnotated<T,Class<T>>,EnhancedAnnotatedType<T>
- Direct Known Subclasses:
ForwardingWeldAnnotation
public abstract class ForwardingWeldClass<T> extends ForwardingWeldAnnotated<T,Class<T>> implements EnhancedAnnotatedType<T>
-
-
Field Summary
-
Fields inherited from interface org.jboss.weld.annotated.enhanced.EnhancedAnnotated
MAPPED_DECLARED_METAANNOTATIONS, MAPPED_METAANNOTATIONS
-
-
Constructor Summary
Constructors Constructor Description ForwardingWeldClass()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description <U> EnhancedAnnotatedType<? extends U>asEnhancedSubclass(EnhancedAnnotatedType<U> clazz)<S> Scast(Object object)protected abstract EnhancedAnnotatedType<T>delegate()Set<javax.enterprise.inject.spi.AnnotatedConstructor<T>>getConstructors()EnhancedAnnotatedConstructor<T>getDeclaredEnhancedConstructor(ConstructorSignature signature)Get the constructor which matches the argument list provided<F> EnhancedAnnotatedField<F,?>getDeclaredEnhancedField(String fieldName)Get a field by nameCollection<EnhancedAnnotatedField<?,? super T>>getDeclaredEnhancedFields()Gets all fields declared on this class only.Collection<EnhancedAnnotatedField<?,? super T>>getDeclaredEnhancedFields(Class<? extends Annotation> annotationType)Gets all fields which are annotated with the given annotation type on this class only.EnhancedAnnotatedMethod<?,?>getDeclaredEnhancedMethod(Method method)Deprecated.<M> EnhancedAnnotatedMethod<M,?>getDeclaredEnhancedMethod(MethodSignature signature)Get a method by name<M> EnhancedAnnotatedMethod<M,?>getDeclaredEnhancedMethod(MethodSignature signature, EnhancedAnnotatedType<M> expectedReturnType)Collection<EnhancedAnnotatedMethod<?,? super T>>getDeclaredEnhancedMethods()Gets all methods on the typeCollection<EnhancedAnnotatedMethod<?,? super T>>getDeclaredEnhancedMethods(Class<? extends Annotation> annotationType)Gets all methods annotated with annotationTypeCollection<EnhancedAnnotatedMethod<?,? super T>>getDeclaredEnhancedMethodsWithAnnotatedParameters(Class<? extends Annotation> annotationType)Gets declared with parameters annotated with annotationTypeCollection<Annotation>getDeclaredMetaAnnotations(Class<? extends Annotation> metaAnnotationType)Gets all annotations which are declared on this annotated item with the given meta annotation typeCollection<EnhancedAnnotatedConstructor<T>>getEnhancedConstructors()Gets all constructorsCollection<EnhancedAnnotatedConstructor<T>>getEnhancedConstructors(Class<? extends Annotation> annotationType)Gets all constructors which are annotated with annotationTypeCollection<EnhancedAnnotatedField<?,? super T>>getEnhancedFields()Gets all fields on the typeCollection<EnhancedAnnotatedField<?,?>>getEnhancedFields(Class<? extends Annotation> annotationType)Gets all fields which are annotated with the given annotation type on this class and all super classesEnhancedAnnotatedMethod<?,?>getEnhancedMethod(Method method)Deprecated.<M> EnhancedAnnotatedMethod<M,?>getEnhancedMethod(MethodSignature signature)Get a method by nameCollection<EnhancedAnnotatedMethod<?,? super T>>getEnhancedMethods()Gets all methods on the type including those declared on a superclass ofEnhancedAnnotated.getJavaClass().Collection<EnhancedAnnotatedMethod<?,? super T>>getEnhancedMethods(Class<? extends Annotation> annotationType)Gets all methods annotated with annotationType including those declared on a superclass ofEnhancedAnnotated.getJavaClass().Collection<EnhancedAnnotatedMethod<?,? super T>>getEnhancedMethodsWithAnnotatedParameters(Class<? extends Annotation> annotationType)Gets all methods with parameters annotated with annotationType including those declared on a superclass ofEnhancedAnnotated.getJavaClass().EnhancedAnnotatedType<? super T>getEnhancedSuperclass()Gets the superclass.Set<javax.enterprise.inject.spi.AnnotatedField<? super T>>getFields()Set<javax.enterprise.inject.spi.AnnotatedMethod<? super T>>getMethods()EnhancedAnnotatedConstructor<T>getNoArgsEnhancedConstructor()Gets the no-args constructorStringgetSimpleName()booleanisAbstract()booleanisAnonymousClass()booleanisDiscovered()booleanisEnum()booleanisEquivalent(Class<?> clazz)Check if this is equivalent to a java classbooleanisLocalClass()booleanisMemberClass()booleanisParameterizedType()booleanisSerializable()SlimAnnotatedType<T>slim()Returns a lightweight implementation ofAnnotatedwith minimal memory footprint.-
Methods inherited from class org.jboss.weld.util.annotated.ForwardingWeldAnnotated
getActualTypeArguments, getBindingsAsArray, getInterfaceClosure, getJavaClass, getMetaAnnotations, getName, getPackage, getQualifiers, isFinal, isGeneric, isPackagePrivate, isPrimitive, isPrivate, isPublic, isStatic
-
Methods inherited from class org.jboss.weld.util.annotated.ForwardingAnnotated
equals, getAnnotation, getAnnotations, getBaseType, getTypeClosure, hashCode, isAnnotationPresent, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface javax.enterprise.inject.spi.Annotated
getAnnotation, getAnnotations, getBaseType, getTypeClosure, isAnnotationPresent
-
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
-
-
-
-
Method Detail
-
delegate
protected abstract EnhancedAnnotatedType<T> delegate()
- Specified by:
delegatein classForwardingWeldAnnotated<T,Class<T>>
-
getDeclaredEnhancedMethods
public Collection<EnhancedAnnotatedMethod<?,? super T>> getDeclaredEnhancedMethods()
Description copied from interface:EnhancedAnnotatedTypeGets all methods on the type- Specified by:
getDeclaredEnhancedMethodsin interfaceEnhancedAnnotatedType<T>- Returns:
- A set of abstracted methods
-
getDeclaredEnhancedMethod
public <M> EnhancedAnnotatedMethod<M,?> getDeclaredEnhancedMethod(MethodSignature signature)
Description copied from interface:EnhancedAnnotatedTypeGet a method by name- Specified by:
getDeclaredEnhancedMethodin interfaceEnhancedAnnotatedType<T>- Type Parameters:
M- the expected return type- Parameters:
signature- the name of the method- Returns:
- the method, or null if it doesn't exist
-
getConstructors
public Set<javax.enterprise.inject.spi.AnnotatedConstructor<T>> getConstructors()
- Specified by:
getConstructorsin interfacejavax.enterprise.inject.spi.AnnotatedType<T>
-
getMethods
public Set<javax.enterprise.inject.spi.AnnotatedMethod<? super T>> getMethods()
- Specified by:
getMethodsin interfacejavax.enterprise.inject.spi.AnnotatedType<T>
-
getFields
public Set<javax.enterprise.inject.spi.AnnotatedField<? super T>> getFields()
- Specified by:
getFieldsin interfacejavax.enterprise.inject.spi.AnnotatedType<T>
-
getEnhancedConstructors
public Collection<EnhancedAnnotatedConstructor<T>> getEnhancedConstructors(Class<? extends Annotation> annotationType)
Description copied from interface:EnhancedAnnotatedTypeGets all constructors which are annotated with annotationType- Specified by:
getEnhancedConstructorsin interfaceEnhancedAnnotatedType<T>- Parameters:
annotationType- The annotation type to match- Returns:
- A set of abstracted fields with the given annotation. Returns an empty set if there are no matches
-
getEnhancedConstructors
public Collection<EnhancedAnnotatedConstructor<T>> getEnhancedConstructors()
Description copied from interface:EnhancedAnnotatedTypeGets all constructors- Specified by:
getEnhancedConstructorsin interfaceEnhancedAnnotatedType<T>
-
getEnhancedFields
public Collection<EnhancedAnnotatedField<?,?>> getEnhancedFields(Class<? extends Annotation> annotationType)
Description copied from interface:EnhancedAnnotatedTypeGets all fields which are annotated with the given annotation type on this class and all super classes- Specified by:
getEnhancedFieldsin interfaceEnhancedAnnotatedType<T>- Parameters:
annotationType- The annotation to match- Returns:
- A set of abstracted fields with the given annotation. Returns an empty set if there are no matches
-
getEnhancedMethods
public Collection<EnhancedAnnotatedMethod<?,? super T>> getEnhancedMethods(Class<? extends Annotation> annotationType)
Description copied from interface:EnhancedAnnotatedTypeGets all methods annotated with annotationType including those declared on a superclass ofEnhancedAnnotated.getJavaClass(). Overridden methods are not returned.- Specified by:
getEnhancedMethodsin interfaceEnhancedAnnotatedType<T>- Parameters:
annotationType- The annotation to match- Returns:
- A set of abstracted methods with the given annotation. Returns an empty set if there are no matches
-
getNoArgsEnhancedConstructor
public EnhancedAnnotatedConstructor<T> getNoArgsEnhancedConstructor()
Description copied from interface:EnhancedAnnotatedTypeGets the no-args constructor- Specified by:
getNoArgsEnhancedConstructorin interfaceEnhancedAnnotatedType<T>- Returns:
- The no-args constructor, or null if not defined
-
getEnhancedMethods
public Collection<EnhancedAnnotatedMethod<?,? super T>> getEnhancedMethods()
Description copied from interface:EnhancedAnnotatedTypeGets all methods on the type including those declared on a superclass ofEnhancedAnnotated.getJavaClass(). Overridden methods are not returned.- Specified by:
getEnhancedMethodsin interfaceEnhancedAnnotatedType<T>- Returns:
- A set of abstracted methods
-
getDeclaredEnhancedFields
public Collection<EnhancedAnnotatedField<?,? super T>> getDeclaredEnhancedFields(Class<? extends Annotation> annotationType)
Description copied from interface:EnhancedAnnotatedTypeGets all fields which are annotated with the given annotation type on this class only.- Specified by:
getDeclaredEnhancedFieldsin interfaceEnhancedAnnotatedType<T>- Parameters:
annotationType- The annotation to match- Returns:
- A set of abstracted fields with the given annotation. Returns an empty set if there are no matches
-
getDeclaredEnhancedFields
public Collection<EnhancedAnnotatedField<?,? super T>> getDeclaredEnhancedFields()
Description copied from interface:EnhancedAnnotatedTypeGets all fields declared on this class only.- Specified by:
getDeclaredEnhancedFieldsin interfaceEnhancedAnnotatedType<T>- Returns:
- A set of abstracted fields. Returns an empty set if there are no matches
-
getDeclaredEnhancedMethods
public Collection<EnhancedAnnotatedMethod<?,? super T>> getDeclaredEnhancedMethods(Class<? extends Annotation> annotationType)
Description copied from interface:EnhancedAnnotatedTypeGets all methods annotated with annotationType- Specified by:
getDeclaredEnhancedMethodsin interfaceEnhancedAnnotatedType<T>- Parameters:
annotationType- The annotation to match- Returns:
- A set of abstracted methods with the given annotation. Returns an empty set if there are no matches
-
getDeclaredEnhancedMethodsWithAnnotatedParameters
public Collection<EnhancedAnnotatedMethod<?,? super T>> getDeclaredEnhancedMethodsWithAnnotatedParameters(Class<? extends Annotation> annotationType)
Description copied from interface:EnhancedAnnotatedTypeGets declared with parameters annotated with annotationType- Specified by:
getDeclaredEnhancedMethodsWithAnnotatedParametersin interfaceEnhancedAnnotatedType<T>- Parameters:
annotationType- The annotation to match- Returns:
- A set of abstracted methods with the given annotation. Returns an empty set if there are no matches
-
getEnhancedFields
public Collection<EnhancedAnnotatedField<?,? super T>> getEnhancedFields()
Description copied from interface:EnhancedAnnotatedTypeGets all fields on the type- Specified by:
getEnhancedFieldsin interfaceEnhancedAnnotatedType<T>- Returns:
- A set of abstracted fields
-
getEnhancedMethod
@Deprecated public EnhancedAnnotatedMethod<?,?> getEnhancedMethod(Method method)
Deprecated.Description copied from interface:EnhancedAnnotatedTypeFind the annotated method for a given methodDescriptor- Specified by:
getEnhancedMethodin interfaceEnhancedAnnotatedType<T>- Returns:
-
getEnhancedMethod
public <M> EnhancedAnnotatedMethod<M,?> getEnhancedMethod(MethodSignature signature)
Description copied from interface:EnhancedAnnotatedTypeGet a method by name- Specified by:
getEnhancedMethodin interfaceEnhancedAnnotatedType<T>- Type Parameters:
M- the expected return type- Parameters:
signature- the name of the method- Returns:
- the method, or null if it doesn't exist
-
getEnhancedSuperclass
public EnhancedAnnotatedType<? super T> getEnhancedSuperclass()
Description copied from interface:EnhancedAnnotatedTypeGets the superclass.- Specified by:
getEnhancedSuperclassin interfaceEnhancedAnnotatedType<T>- Returns:
- The abstracted superclass, null if there is no superclass
-
isLocalClass
public boolean isLocalClass()
- Specified by:
isLocalClassin interfaceEnhancedAnnotatedType<T>
-
isMemberClass
public boolean isMemberClass()
- Specified by:
isMemberClassin interfaceEnhancedAnnotatedType<T>
-
isAnonymousClass
public boolean isAnonymousClass()
- Specified by:
isAnonymousClassin interfaceEnhancedAnnotatedType<T>
-
isParameterizedType
public boolean isParameterizedType()
- Specified by:
isParameterizedTypein interfaceEnhancedAnnotated<T,Class<T>>- Specified by:
isParameterizedTypein interfaceEnhancedAnnotatedType<T>- Overrides:
isParameterizedTypein classForwardingWeldAnnotated<T,Class<T>>
-
isAbstract
public boolean isAbstract()
- Specified by:
isAbstractin interfaceEnhancedAnnotatedType<T>
-
isEnum
public boolean isEnum()
- Specified by:
isEnumin interfaceEnhancedAnnotatedType<T>
-
isSerializable
public boolean isSerializable()
- Specified by:
isSerializablein interfaceEnhancedAnnotatedType<T>
-
getDeclaredEnhancedMethod
@Deprecated public EnhancedAnnotatedMethod<?,?> getDeclaredEnhancedMethod(Method method)
Deprecated.- Specified by:
getDeclaredEnhancedMethodin interfaceEnhancedAnnotatedType<T>
-
getDeclaredEnhancedField
public <F> EnhancedAnnotatedField<F,?> getDeclaredEnhancedField(String fieldName)
Description copied from interface:EnhancedAnnotatedTypeGet a field by name- Specified by:
getDeclaredEnhancedFieldin interfaceEnhancedAnnotatedType<T>- Type Parameters:
F- the expected type of the field- Parameters:
fieldName- the field name- Returns:
- the field
-
getDeclaredEnhancedMethod
public <M> EnhancedAnnotatedMethod<M,?> getDeclaredEnhancedMethod(MethodSignature signature, EnhancedAnnotatedType<M> expectedReturnType)
-
getDeclaredEnhancedConstructor
public EnhancedAnnotatedConstructor<T> getDeclaredEnhancedConstructor(ConstructorSignature signature)
Description copied from interface:EnhancedAnnotatedTypeGet the constructor which matches the argument list provided- Specified by:
getDeclaredEnhancedConstructorin interfaceEnhancedAnnotatedType<T>- Returns:
- the matching constructor, or null if not defined
-
asEnhancedSubclass
public <U> EnhancedAnnotatedType<? extends U> asEnhancedSubclass(EnhancedAnnotatedType<U> clazz)
- Specified by:
asEnhancedSubclassin interfaceEnhancedAnnotatedType<T>
-
cast
public <S> S cast(Object object)
- Specified by:
castin interfaceEnhancedAnnotatedType<T>
-
isEquivalent
public boolean isEquivalent(Class<?> clazz)
Description copied from interface:EnhancedAnnotatedTypeCheck if this is equivalent to a java class- Specified by:
isEquivalentin interfaceEnhancedAnnotatedType<T>- Parameters:
clazz- The Java class- Returns:
- true if equivalent
-
getSimpleName
public String getSimpleName()
- Specified by:
getSimpleNamein interfaceEnhancedAnnotatedType<T>
-
getDeclaredMetaAnnotations
public Collection<Annotation> getDeclaredMetaAnnotations(Class<? extends Annotation> metaAnnotationType)
Description copied from interface:EnhancedAnnotatedTypeGets all annotations which are declared on this annotated item with the given meta annotation type- Specified by:
getDeclaredMetaAnnotationsin interfaceEnhancedAnnotatedType<T>- Returns:
- A set of matching meta-annotations. Returns an empty set if there are no matches.
-
isDiscovered
public boolean isDiscovered()
- Specified by:
isDiscoveredin interfaceEnhancedAnnotatedType<T>
-
slim
public SlimAnnotatedType<T> slim()
Description copied from interface:EnhancedAnnotatedReturns a lightweight implementation ofAnnotatedwith minimal memory footprint.- Specified by:
slimin interfaceEnhancedAnnotated<T,Class<T>>- Specified by:
slimin interfaceEnhancedAnnotatedType<T>- Overrides:
slimin classForwardingWeldAnnotated<T,Class<T>>- Returns:
- the slim version of this
Annotated
-
getEnhancedMethodsWithAnnotatedParameters
public Collection<EnhancedAnnotatedMethod<?,? super T>> getEnhancedMethodsWithAnnotatedParameters(Class<? extends Annotation> annotationType)
Description copied from interface:EnhancedAnnotatedTypeGets all methods with parameters annotated with annotationType including those declared on a superclass ofEnhancedAnnotated.getJavaClass(). Overridden methods are not returned.- Specified by:
getEnhancedMethodsWithAnnotatedParametersin interfaceEnhancedAnnotatedType<T>- Parameters:
annotationType- The annotation to match- Returns:
- A set of abstracted methods with the given annotation. Returns an empty set if there are no matches
-
-