org.jboss.weld.introspector
Interface WeldClass<T>

All Superinterfaces:
javax.enterprise.inject.spi.Annotated, javax.enterprise.inject.spi.AnnotatedType<T>, WeldAnnotated<T,java.lang.Class<T>>
All Known Subinterfaces:
WeldAnnotation<T>
All Known Implementing Classes:
ForwardingWeldAnnotation, ForwardingWeldClass, WeldAnnotationImpl, WeldClassImpl

public interface WeldClass<T>
extends WeldAnnotated<T,java.lang.Class<T>>, javax.enterprise.inject.spi.AnnotatedType<T>

Represents a Class

Author:
Pete Muir

Field Summary
 
Fields inherited from interface org.jboss.weld.introspector.WeldAnnotated
MAPPED_METAANNOTATIONS
 
Method Summary
<U> WeldClass<? extends U>
asWeldSubclass(WeldClass<U> clazz)
           
<S> S
cast(java.lang.Object object)
           
 java.util.Set<WeldConstructor<T>> getAnnotatedWeldConstructors(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
          Gets all constructors which are annotated with annotationType
 java.util.Set<WeldField<?,?>> getAnnotatedWeldFields(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<WeldMethod<?,?>> getAnnotatedWeldMethods(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
          Gets all methods annotated with annotationType
 java.util.Set<WeldField<?,T>> getDeclaredAnnotatedWeldFields(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<WeldMethod<?,T>> getDeclaredAnnotatedWeldMethods(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
          Gets all methods annotated with annotationType
 WeldConstructor<T> getDeclaredWeldConstructor(ConstructorSignature signature)
          Get the constructor which matches the argument list provided
<F> WeldField<F,?>
getDeclaredWeldField(java.lang.String fieldName, WeldClass<F> expectedType)
          Get a field by name
 WeldMethod<?,?> getDeclaredWeldMethod(java.lang.reflect.Method method)
          Deprecated. 
<M> WeldMethod<M,?>
getDeclaredWeldMethod(MethodSignature signature, WeldClass<M> expectedReturnType)
          Get a method by name
 java.util.Set<WeldMethod<?,?>> getDeclaredWeldMethods()
          Gets all fields on the type
 java.util.Set<WeldMethod<?,T>> getDeclaredWeldMethodsWithAnnotatedParameters(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
          Gets all with parameters annotated with annotationType
 java.util.Set<WeldField<?,?>> getMetaAnnotatedWeldFields(java.lang.Class<? extends java.lang.annotation.Annotation> metaAnnotationType)
          Gets all fields which are meta-annotated with metaAnnotationType
 WeldConstructor<T> getNoArgsWeldConstructor()
          Gets the no-args constructor
 java.lang.String getSimpleName()
           
<M> WeldMethod<M,?>
getWBMethod(MethodSignature signature)
          Get a method by name
 java.util.Set<WeldConstructor<T>> getWeldConstructors()
          Gets all constructors
 java.util.Set<WeldConstructor<?>> getWeldConstructorsWithAnnotatedParameters(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
          Gets all with constructors annotated with annotationType
 java.util.Set<WeldField<?,?>> getWeldFields()
          Gets all fields on the type
 WeldMethod<?,?> getWeldMethod(java.lang.reflect.Method method)
          Find the annotated method for a given methodDescriptor
 java.util.Set<WeldMethod<?,?>> getWeldMethods()
          Gets all fields on the type
 java.util.Set<WeldMethod<?,?>> getWeldMethodsWithAnnotatedParameters(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
          Gets all with parameters annotated with annotationType
 WeldClass<?> getWeldSuperclass()
          Gets the superclass.
 boolean isAbstract()
           
 boolean isEnum()
           
 boolean isEquivalent(java.lang.Class<?> clazz)
          Check if this is equivalent to a java class
 boolean isNonStaticMemberClass()
          Determine if this is a non-static member class
 boolean isParameterizedType()
           
 
Methods inherited from interface org.jboss.weld.introspector.WeldAnnotated
getActualTypeArguments, getBindingsAsArray, getDeclaredMetaAnnotations, getInterfaceOnlyFlattenedTypeHierarchy, getJavaClass, getMetaAnnotations, getMetaAnnotationsAsArray, getName, getPackage, getQualifiers, isDeclaredAnnotationPresent, isFinal, isPackagePrivate, isPrivate, isProxyable, isPublic, isStatic
 
Methods inherited from interface javax.enterprise.inject.spi.AnnotatedType
getConstructors, getFields, getJavaClass, getMethods
 
Methods inherited from interface javax.enterprise.inject.spi.Annotated
getAnnotation, getAnnotations, getBaseType, getTypeClosure, isAnnotationPresent
 

Method Detail

getWeldFields

java.util.Set<WeldField<?,?>> getWeldFields()
Gets all fields on the type

Returns:
A set of abstracted fields

getWeldMethods

java.util.Set<WeldMethod<?,?>> getWeldMethods()
Gets all fields on the type

Returns:
A set of abstracted fields

getDeclaredWeldMethods

java.util.Set<WeldMethod<?,?>> getDeclaredWeldMethods()
Gets all fields on the type

Returns:
A set of abstracted fields

getDeclaredWeldField

<F> WeldField<F,?> getDeclaredWeldField(java.lang.String fieldName,
                                        WeldClass<F> expectedType)
Get a field by name

Type Parameters:
F - the expected type of the field
Parameters:
fieldName - the field name
expectedType - the expected type of the field
Returns:
the field

getAnnotatedWeldFields

java.util.Set<WeldField<?,?>> getAnnotatedWeldFields(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

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

getDeclaredAnnotatedWeldFields

java.util.Set<WeldField<?,T>> getDeclaredAnnotatedWeldFields(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Gets all fields which are annotated with the given annotation type on this class only.

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

getMetaAnnotatedWeldFields

java.util.Set<WeldField<?,?>> getMetaAnnotatedWeldFields(java.lang.Class<? extends java.lang.annotation.Annotation> metaAnnotationType)
Gets all fields which are meta-annotated with metaAnnotationType

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

getAnnotatedWeldConstructors

java.util.Set<WeldConstructor<T>> getAnnotatedWeldConstructors(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Gets all constructors which are annotated with annotationType

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

getWeldConstructors

java.util.Set<WeldConstructor<T>> getWeldConstructors()
Gets all constructors

Returns:
A set of abstracted constructors

getNoArgsWeldConstructor

WeldConstructor<T> getNoArgsWeldConstructor()
Gets the no-args constructor

Returns:
The no-args constructor, or null if not defined

getDeclaredWeldConstructor

WeldConstructor<T> getDeclaredWeldConstructor(ConstructorSignature signature)
Get the constructor which matches the argument list provided

Parameters:
parameterTypes - the parameters of the constructor
Returns:
the matching constructor, or null if not defined

getAnnotatedWeldMethods

java.util.Set<WeldMethod<?,?>> getAnnotatedWeldMethods(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Gets all methods annotated with annotationType

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

getDeclaredAnnotatedWeldMethods

java.util.Set<WeldMethod<?,T>> getDeclaredAnnotatedWeldMethods(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Gets all methods annotated with annotationType

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

getWeldMethod

WeldMethod<?,?> getWeldMethod(java.lang.reflect.Method method)
Find the annotated method for a given methodDescriptor

Parameters:
methodDescriptor -
Returns:

getDeclaredWeldMethod

<M> WeldMethod<M,?> getDeclaredWeldMethod(MethodSignature signature,
                                          WeldClass<M> expectedReturnType)
Get a method by name

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

getWBMethod

<M> WeldMethod<M,?> getWBMethod(MethodSignature signature)
Get a method by name

Type Parameters:
M - the expected return type
Parameters:
signature - the name of the method
Returns:
the method, or null if it doesn't exist

getDeclaredWeldMethod

@Deprecated
WeldMethod<?,?> getDeclaredWeldMethod(java.lang.reflect.Method method)
Deprecated. 


getWeldMethodsWithAnnotatedParameters

java.util.Set<WeldMethod<?,?>> getWeldMethodsWithAnnotatedParameters(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Gets all with parameters annotated with annotationType

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

getWeldConstructorsWithAnnotatedParameters

java.util.Set<WeldConstructor<?>> getWeldConstructorsWithAnnotatedParameters(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Gets all with constructors annotated with annotationType

Parameters:
annotationType - The annotation to match
Returns:
A set of abstracted constructors with the given annotation. Returns an empty set if there are no matches

getDeclaredWeldMethodsWithAnnotatedParameters

java.util.Set<WeldMethod<?,T>> getDeclaredWeldMethodsWithAnnotatedParameters(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Gets all with parameters annotated with annotationType

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

getWeldSuperclass

WeldClass<?> getWeldSuperclass()
Gets the superclass.

Returns:
The abstracted superclass, null if there is no superclass

isNonStaticMemberClass

boolean isNonStaticMemberClass()
Determine if this is a non-static member class

Returns:
true if this is a non-static member

isParameterizedType

boolean isParameterizedType()
Specified by:
isParameterizedType in interface WeldAnnotated<T,java.lang.Class<T>>

isAbstract

boolean isAbstract()

isEnum

boolean isEnum()

cast

<S> S cast(java.lang.Object object)

asWeldSubclass

<U> WeldClass<? extends U> asWeldSubclass(WeldClass<U> clazz)

isEquivalent

boolean isEquivalent(java.lang.Class<?> clazz)
Check if this is equivalent to a java class

Parameters:
clazz - The Java class
Returns:
true if equivalent

getSimpleName

java.lang.String getSimpleName()


Copyright © 2008-2009 Seam Framework. All Rights Reserved.