org.jboss.webbeans.introspector
Class ForwardingAnnotatedClass<T>

java.lang.Object
  extended by org.jboss.webbeans.introspector.ForwardingAnnotatedItem<T,java.lang.Class<T>>
      extended by org.jboss.webbeans.introspector.ForwardingAnnotatedType<T>
          extended by org.jboss.webbeans.introspector.ForwardingAnnotatedClass<T>
All Implemented Interfaces:
AnnotatedClass<T>, AnnotatedItem<T,java.lang.Class<T>>, AnnotatedType<T>
Direct Known Subclasses:
WrappedAnnotatedClass

public abstract class ForwardingAnnotatedClass<T>
extends ForwardingAnnotatedType<T>
implements AnnotatedClass<T>


Field Summary
 
Fields inherited from interface org.jboss.webbeans.introspector.AnnotatedItem
MAPPED_METAANNOTATIONS
 
Constructor Summary
ForwardingAnnotatedClass()
           
 
Method Summary
<U> AnnotatedClass<? extends U>
asSubclass(AnnotatedClass<U> clazz)
           
<S> S
cast(java.lang.Object object)
           
protected abstract  AnnotatedClass<T> delegate()
          Gets the annotated item
 java.util.Set<AnnotatedConstructor<T>> getAnnotatedConstructors(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
          Gets all constructors which are annotated with annotationType
 java.util.Set<AnnotatedField<?>> getAnnotatedFields(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
          Gets all fields which are annotated with the given annotation type on this class and all super classes
 java.util.Set<AnnotatedMethod<?>> getAnnotatedMethods(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
          Gets all methods annotated with annotationType
 java.util.Set<AnnotatedConstructor<T>> getConstructors()
          Gets all constructors
 java.util.Set<AnnotatedField<?>> getDeclaredAnnotatedFields(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
          Gets all fields which are annotated with the given annotation type on this class only.
 java.util.Set<AnnotatedMethod<?>> getDeclaredAnnotatedMethods(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
          Gets all methods annotated with annotationType
 AnnotatedConstructor<T> getDeclaredConstructor(ConstructorSignature signature)
          Get the constructor which matches the argument list provided
<F> AnnotatedField<F>
getDeclaredField(java.lang.String fieldName, AnnotatedClass<F> expectedType)
          Get a field by name
 AnnotatedMethod<?> getDeclaredMethod(java.lang.reflect.Method method)
          Deprecated. 
<M> AnnotatedMethod<M>
getDeclaredMethod(MethodSignature signature, AnnotatedClass<M> expectedReturnType)
          Get a method by name
 java.util.Set<AnnotatedMethod<?>> getDeclaredMethodsWithAnnotatedParameters(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
          Gets all with parameters annotated with annotationType
 java.util.Set<AnnotatedField<?>> getFields()
          Gets all fields on the type
 java.util.Set<AnnotatedField<?>> getMetaAnnotatedFields(java.lang.Class<? extends java.lang.annotation.Annotation> metaAnnotationType)
          Gets all fields which are meta-annotated with metaAnnotationType
 AnnotatedMethod<?> getMethod(java.lang.reflect.Method method)
          Deprecated. 
 java.util.Set<AnnotatedMethod<?>> getMethodsWithAnnotatedParameters(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
          Gets all with parameters annotated with annotationType
 AnnotatedConstructor<T> getNoArgsConstructor()
          Gets the no-args constructor
 AnnotatedClass<?> getSuperclass()
          Gets the superclass of the type
 boolean isAbstract()
           
 boolean isEnum()
           
 boolean isNonStaticMemberClass()
          Determine if this is a non-static member class
 boolean isParameterizedType()
           
 
Methods inherited from class org.jboss.webbeans.introspector.ForwardingAnnotatedType
getSimpleName, isEquivalent
 
Methods inherited from class org.jboss.webbeans.introspector.ForwardingAnnotatedItem
equals, getActualTypeArguments, getAnnotation, getAnnotationsAsSet, getAnnotationStore, getBindings, getBindingsAsArray, getDeclaredMetaAnnotations, getFlattenedTypeHierarchy, getMetaAnnotations, getMetaAnnotationsAsArray, getName, getRawType, getType, hashCode, isAnnotationPresent, isAssignableFrom, isAssignableFrom, isDeclaredAnnotationPresent, isFinal, isProxyable, isPublic, isStatic, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jboss.webbeans.introspector.AnnotatedType
getSimpleName, isEquivalent
 
Methods inherited from interface org.jboss.webbeans.introspector.AnnotatedItem
getActualTypeArguments, getAnnotation, getAnnotationsAsSet, getAnnotationStore, getBindings, getBindingsAsArray, getDeclaredMetaAnnotations, getFlattenedTypeHierarchy, getMetaAnnotations, getMetaAnnotationsAsArray, getName, getRawType, getType, isAnnotationPresent, isAssignableFrom, isAssignableFrom, isDeclaredAnnotationPresent, isFinal, isProxyable, isPublic, isStatic
 

Constructor Detail

ForwardingAnnotatedClass

public ForwardingAnnotatedClass()
Method Detail

delegate

protected abstract AnnotatedClass<T> delegate()
Description copied from class: ForwardingAnnotatedItem
Gets the annotated item

Specified by:
delegate in class ForwardingAnnotatedType<T>
Returns:
The annotated item

getAnnotatedConstructors

public java.util.Set<AnnotatedConstructor<T>> getAnnotatedConstructors(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Description copied from interface: AnnotatedClass
Gets all constructors which are annotated with annotationType

Specified by:
getAnnotatedConstructors in interface AnnotatedClass<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

getAnnotatedFields

public java.util.Set<AnnotatedField<?>> getAnnotatedFields(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Description copied from interface: AnnotatedClass
Gets all fields which are annotated with the given annotation type on this class and all super classes

Specified by:
getAnnotatedFields in interface AnnotatedClass<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

getAnnotatedMethods

public java.util.Set<AnnotatedMethod<?>> getAnnotatedMethods(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Description copied from interface: AnnotatedClass
Gets all methods annotated with annotationType

Specified by:
getAnnotatedMethods in interface AnnotatedClass<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

getNoArgsConstructor

public AnnotatedConstructor<T> getNoArgsConstructor()
Description copied from interface: AnnotatedClass
Gets the no-args constructor

Specified by:
getNoArgsConstructor in interface AnnotatedClass<T>
Returns:
The no-args constructor, or null if not defined

getConstructors

public java.util.Set<AnnotatedConstructor<T>> getConstructors()
Description copied from interface: AnnotatedClass
Gets all constructors

Specified by:
getConstructors in interface AnnotatedClass<T>
Returns:
A set of abstracted constructors

getDeclaredAnnotatedFields

public java.util.Set<AnnotatedField<?>> getDeclaredAnnotatedFields(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Description copied from interface: AnnotatedClass
Gets all fields which are annotated with the given annotation type on this class only.

Specified by:
getDeclaredAnnotatedFields in interface AnnotatedClass<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

getDeclaredAnnotatedMethods

public java.util.Set<AnnotatedMethod<?>> getDeclaredAnnotatedMethods(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Description copied from interface: AnnotatedClass
Gets all methods annotated with annotationType

Specified by:
getDeclaredAnnotatedMethods in interface AnnotatedClass<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

getDeclaredMethodsWithAnnotatedParameters

public java.util.Set<AnnotatedMethod<?>> getDeclaredMethodsWithAnnotatedParameters(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Description copied from interface: AnnotatedClass
Gets all with parameters annotated with annotationType

Specified by:
getDeclaredMethodsWithAnnotatedParameters in interface AnnotatedClass<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

getFields

public java.util.Set<AnnotatedField<?>> getFields()
Description copied from interface: AnnotatedClass
Gets all fields on the type

Specified by:
getFields in interface AnnotatedClass<T>
Returns:
A set of abstracted fields

getMetaAnnotatedFields

public java.util.Set<AnnotatedField<?>> getMetaAnnotatedFields(java.lang.Class<? extends java.lang.annotation.Annotation> metaAnnotationType)
Description copied from interface: AnnotatedClass
Gets all fields which are meta-annotated with metaAnnotationType

Specified by:
getMetaAnnotatedFields in interface AnnotatedClass<T>
Parameters:
metaAnnotationType - The meta annotation to match
Returns:
A set of abstracted fields with the given meta-annotation. Returns an empty set if there are no matches

getMethod

@Deprecated
public AnnotatedMethod<?> getMethod(java.lang.reflect.Method method)
Deprecated. 

Description copied from interface: AnnotatedClass
Find the annotated method for a given methodDescriptor

Specified by:
getMethod in interface AnnotatedClass<T>
Returns:
TODO Replace with AnnotatedMethod variant

getMethodsWithAnnotatedParameters

public java.util.Set<AnnotatedMethod<?>> getMethodsWithAnnotatedParameters(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Description copied from interface: AnnotatedClass
Gets all with parameters annotated with annotationType

Specified by:
getMethodsWithAnnotatedParameters in interface AnnotatedClass<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

getSuperclass

public AnnotatedClass<?> getSuperclass()
Description copied from interface: AnnotatedType
Gets the superclass of the type

Specified by:
getSuperclass in interface AnnotatedClass<T>
Specified by:
getSuperclass in interface AnnotatedType<T>
Overrides:
getSuperclass in class ForwardingAnnotatedType<T>
Returns:
The abstracted superclass

isNonStaticMemberClass

public boolean isNonStaticMemberClass()
Description copied from interface: AnnotatedClass
Determine if this is a non-static member class

Specified by:
isNonStaticMemberClass in interface AnnotatedClass<T>
Returns:
true if this is a non-static member

isParameterizedType

public boolean isParameterizedType()
Specified by:
isParameterizedType in interface AnnotatedClass<T>
Specified by:
isParameterizedType in interface AnnotatedItem<T,java.lang.Class<T>>
Overrides:
isParameterizedType in class ForwardingAnnotatedItem<T,java.lang.Class<T>>

isAbstract

public boolean isAbstract()
Specified by:
isAbstract in interface AnnotatedClass<T>

isEnum

public boolean isEnum()
Specified by:
isEnum in interface AnnotatedClass<T>

getDeclaredMethod

@Deprecated
public AnnotatedMethod<?> getDeclaredMethod(java.lang.reflect.Method method)
Deprecated. 

Specified by:
getDeclaredMethod in interface AnnotatedClass<T>

getDeclaredField

public <F> AnnotatedField<F> getDeclaredField(java.lang.String fieldName,
                                              AnnotatedClass<F> expectedType)
Description copied from interface: AnnotatedClass
Get a field by name

Specified by:
getDeclaredField in interface AnnotatedClass<T>
Type Parameters:
F - the expected type of the field
Parameters:
fieldName - the field name
expectedType - the expected type of the field
Returns:
the field

getDeclaredMethod

public <M> AnnotatedMethod<M> getDeclaredMethod(MethodSignature signature,
                                                AnnotatedClass<M> expectedReturnType)
Description copied from interface: AnnotatedClass
Get a method by name

Specified by:
getDeclaredMethod in interface AnnotatedClass<T>
Type Parameters:
M - the expected return type
Parameters:
signature - the name of the method
expectedReturnType - the expected return type
Returns:
the method, or null if it doesn't exist

getDeclaredConstructor

public AnnotatedConstructor<T> getDeclaredConstructor(ConstructorSignature signature)
Description copied from interface: AnnotatedClass
Get the constructor which matches the argument list provided

Specified by:
getDeclaredConstructor in interface AnnotatedClass<T>
Returns:
the matching constructor, or null if not defined

asSubclass

public <U> AnnotatedClass<? extends U> asSubclass(AnnotatedClass<U> clazz)
Specified by:
asSubclass in interface AnnotatedClass<T>

cast

public <S> S cast(java.lang.Object object)
Specified by:
cast in interface AnnotatedClass<T>


Copyright © 2011. All Rights Reserved.