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

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

public interface WeldClass<T>
extends WeldAnnotated<T,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_DECLARED_METAANNOTATIONS, MAPPED_METAANNOTATIONS
 
Method Summary
<U> WeldClass<? extends U>
asWeldSubclass(WeldClass<U> clazz)
           
<S> S
cast(Object object)
           
 Collection<Annotation> getDeclaredMetaAnnotations(Class<? extends Annotation> metaAnnotationType)
          Gets all annotations which are declared on this annotated item with the given meta annotation type
 WeldConstructor<T> getDeclaredWeldConstructor(ConstructorSignature signature)
          Get the constructor which matches the argument list provided
<F> WeldField<F,?>
getDeclaredWeldField(String fieldName)
          Get a field by name
 Collection<WeldField<?,? super T>> getDeclaredWeldFields(Class<? extends Annotation> annotationType)
          Gets all fields which are annotated with the given annotation type on this class only.
 WeldMethod<?,?> getDeclaredWeldMethod(Method method)
          Deprecated. 
<M> WeldMethod<M,?>
getDeclaredWeldMethod(MethodSignature signature)
          Get a method by name
 Collection<WeldMethod<?,? super T>> getDeclaredWeldMethods()
          Gets all fields on the type
 Collection<WeldMethod<?,? super T>> getDeclaredWeldMethods(Class<? extends Annotation> annotationType)
          Gets all methods annotated with annotationType
 Collection<WeldMethod<?,? super T>> getDeclaredWeldMethodsWithAnnotatedParameters(Class<? extends Annotation> annotationType)
          Gets declared with parameters annotated with annotationType
 WeldConstructor<T> getNoArgsWeldConstructor()
          Gets the no-args constructor
 String getSimpleName()
           
 Collection<WeldConstructor<T>> getWeldConstructors(Class<? extends Annotation> annotationType)
          Gets all constructors which are annotated with annotationType
 Collection<WeldField<?,?>> getWeldFields()
          Gets all fields on the type
 Collection<WeldField<?,?>> getWeldFields(Class<? extends Annotation> annotationType)
          Gets all fields which are annotated with the given annotation type on this class and all super classes
 WeldMethod<?,?> getWeldMethod(Method method)
          Deprecated. 
<M> WeldMethod<M,?>
getWeldMethod(MethodSignature signature)
          Get a method by name
 Collection<WeldMethod<?,? super T>> getWeldMethods()
          Gets all fields on the type
 Collection<WeldMethod<?,?>> getWeldMethods(Class<? extends Annotation> annotationType)
          Gets all methods annotated with annotationType
 WeldClass<? super T> getWeldSuperclass()
          Gets the superclass.
 boolean isAbstract()
           
 boolean isAnonymousClass()
           
 boolean isDiscovered()
           
 boolean isEnum()
           
 boolean isEquivalent(Class<?> clazz)
          Check if this is equivalent to a java class
 boolean isLocalClass()
           
 boolean isMemberClass()
           
 boolean isParameterizedType()
           
 boolean isSerializable()
           
 
Methods inherited from interface org.jboss.weld.introspector.WeldAnnotated
getActualTypeArguments, getBindingsAsArray, getInterfaceClosure, getJavaClass, getMetaAnnotations, getName, getPackage, getQualifiers, isFinal, isGeneric, isPackagePrivate, isPrimitive, isPrivate, 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

Collection<WeldField<?,?>> getWeldFields()
Gets all fields on the type

Returns:
A set of abstracted fields

getWeldMethods

Collection<WeldMethod<?,? super T>> getWeldMethods()
Gets all fields on the type

Returns:
A set of abstracted fields

getDeclaredWeldMethods

Collection<WeldMethod<?,? super T>> getDeclaredWeldMethods()
Gets all fields on the type

Returns:
A set of abstracted fields

getDeclaredWeldField

<F> WeldField<F,?> getDeclaredWeldField(String fieldName)
Get a field by name

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

getWeldFields

Collection<WeldField<?,?>> getWeldFields(Class<? extends 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

getDeclaredWeldFields

Collection<WeldField<?,? super T>> getDeclaredWeldFields(Class<? extends 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

getWeldConstructors

Collection<WeldConstructor<T>> getWeldConstructors(Class<? extends 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

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

getWeldMethods

Collection<WeldMethod<?,?>> getWeldMethods(Class<? extends 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

getDeclaredWeldMethods

Collection<WeldMethod<?,? super T>> getDeclaredWeldMethods(Class<? extends 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

@Deprecated
WeldMethod<?,?> getWeldMethod(Method method)
Deprecated. 

Find the annotated method for a given methodDescriptor

Parameters:
methodDescriptor -
Returns:

getDeclaredWeldMethod

<M> WeldMethod<M,?> getDeclaredWeldMethod(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

getWeldMethod

<M> WeldMethod<M,?> getWeldMethod(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(Method method)
Deprecated. 


getDeclaredWeldMethodsWithAnnotatedParameters

Collection<WeldMethod<?,? super T>> getDeclaredWeldMethodsWithAnnotatedParameters(Class<? extends Annotation> annotationType)
Gets declared 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<? super T> getWeldSuperclass()
Gets the superclass.

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

isParameterizedType

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

isAbstract

boolean isAbstract()

isEnum

boolean isEnum()

isMemberClass

boolean isMemberClass()

isLocalClass

boolean isLocalClass()

isAnonymousClass

boolean isAnonymousClass()

isSerializable

boolean isSerializable()

isDiscovered

boolean isDiscovered()

cast

<S> S cast(Object object)

asWeldSubclass

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

isEquivalent

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

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

getSimpleName

String getSimpleName()

getDeclaredMetaAnnotations

Collection<Annotation> getDeclaredMetaAnnotations(Class<? extends Annotation> metaAnnotationType)
Gets all annotations which are declared on this annotated item with the given meta annotation type

Parameters:
The - meta annotation to match
Returns:
A set of matching meta-annotations. Returns an empty set if there are no matches.


Copyright © 2013 Seam Framework. All Rights Reserved.