org.jboss.weld.introspector.jlr
Class WeldAnnotationImpl<T extends java.lang.annotation.Annotation>

java.lang.Object
  extended by org.jboss.weld.introspector.jlr.AbstractWeldAnnotated<T,java.lang.Class<T>>
      extended by org.jboss.weld.introspector.jlr.WeldClassImpl<T>
          extended by org.jboss.weld.introspector.jlr.WeldAnnotationImpl<T>
Type Parameters:
T -
All Implemented Interfaces:
javax.enterprise.inject.spi.Annotated, javax.enterprise.inject.spi.AnnotatedType<T>, WeldAnnotated<T,java.lang.Class<T>>, WeldAnnotation<T>, WeldClass<T>

public class WeldAnnotationImpl<T extends java.lang.annotation.Annotation>
extends WeldClassImpl<T>
implements WeldAnnotation<T>

Represents an annotated annotation This class is immutable and therefore threadsafe

Author:
Pete Muir

Field Summary
 
Fields inherited from interface org.jboss.weld.introspector.WeldAnnotated
MAPPED_METAANNOTATIONS
 
Constructor Summary
protected WeldAnnotationImpl(java.lang.Class<T> annotationType, ClassTransformer classTransformer)
          Constructor Initializes the superclass with the built annotation map
 
Method Summary
 java.util.Set<WeldMethod<?,?>> getAnnotatedMembers(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
          Returns the annotated members with a given annotation type If the annotated members are null, they are initialized first.
 java.lang.Class<T> getDelegate()
          Gets the delegate (class)
<A> WeldMethod<A,?>
getMember(java.lang.String memberName, WeldClass<A> expectedType)
          Get an annotation member by name
 java.util.Set<WeldMethod<?,?>> getMembers()
          Gets all members of the annotation Initializes the members first if they are null
static
<A extends java.lang.annotation.Annotation>
WeldAnnotation<A>
of(java.lang.Class<A> annotationType, ClassTransformer classTransformer)
           
 java.lang.String toString()
          Gets a string representation of the annotation
 
Methods inherited from class org.jboss.weld.introspector.jlr.WeldClassImpl
asWeldSubclass, cast, getAnnotatedClass, getAnnotatedWeldConstructors, getAnnotatedWeldFields, getAnnotatedWeldMethods, getConstructors, getDeclaredAnnotatedWeldFields, getDeclaredAnnotatedWeldMethods, getDeclaredFields, getDeclaredWeldConstructor, getDeclaredWeldField, getDeclaredWeldMethod, getDeclaredWeldMethod, getDeclaredWeldMethods, getDeclaredWeldMethodsWithAnnotatedParameters, getFields, getMetaAnnotatedWeldFields, getMethods, getName, getNoArgsWeldConstructor, getPackage, getSimpleName, getWBMethod, getWeldConstructors, getWeldConstructorsWithAnnotatedParameters, getWeldFields, getWeldMethod, getWeldMethods, getWeldMethodsWithAnnotatedParameters, getWeldSuperclass, isAbstract, isEnum, isEquivalent, isFinal, isNonStaticMemberClass, isPackagePrivate, isPrivate, isPublic, isStatic, of, of
 
Methods inherited from class org.jboss.weld.introspector.jlr.AbstractWeldAnnotated
equals, getActualTypeArguments, getAnnotation, getAnnotations, getAnnotationStore, getBaseType, getBindingsAsArray, getDeclaredMetaAnnotations, getInterfaceOnlyFlattenedTypeHierarchy, getJavaClass, getMetaAnnotations, getMetaAnnotationsAsArray, getQualifiers, getTypeClosure, hashCode, isAnnotationPresent, isDeclaredAnnotationPresent, isParameterizedType, isProxyable
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jboss.weld.introspector.WeldClass
asWeldSubclass, cast, getAnnotatedWeldConstructors, getAnnotatedWeldFields, getAnnotatedWeldMethods, getDeclaredAnnotatedWeldFields, getDeclaredAnnotatedWeldMethods, getDeclaredWeldConstructor, getDeclaredWeldField, getDeclaredWeldMethod, getDeclaredWeldMethod, getDeclaredWeldMethods, getDeclaredWeldMethodsWithAnnotatedParameters, getMetaAnnotatedWeldFields, getNoArgsWeldConstructor, getSimpleName, getWBMethod, getWeldConstructors, getWeldConstructorsWithAnnotatedParameters, getWeldFields, getWeldMethod, getWeldMethods, getWeldMethodsWithAnnotatedParameters, getWeldSuperclass, isAbstract, isEnum, isEquivalent, isNonStaticMemberClass, 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
 

Constructor Detail

WeldAnnotationImpl

protected WeldAnnotationImpl(java.lang.Class<T> annotationType,
                             ClassTransformer classTransformer)
Constructor Initializes the superclass with the built annotation map

Parameters:
annotationType - The annotation type
Method Detail

of

public static <A extends java.lang.annotation.Annotation> WeldAnnotation<A> of(java.lang.Class<A> annotationType,
                                                                               ClassTransformer classTransformer)

getMembers

public java.util.Set<WeldMethod<?,?>> getMembers()
Gets all members of the annotation Initializes the members first if they are null

Specified by:
getMembers in interface WeldAnnotation<T extends java.lang.annotation.Annotation>
Returns:
The set of abstracted members
See Also:
WeldAnnotation.getMembers()

getAnnotatedMembers

public java.util.Set<WeldMethod<?,?>> getAnnotatedMembers(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Returns the annotated members with a given annotation type If the annotated members are null, they are initialized first.

Specified by:
getAnnotatedMembers in interface WeldAnnotation<T extends java.lang.annotation.Annotation>
Parameters:
annotationType - The annotation type to match
Returns:
The set of abstracted members with the given annotation type present. An empty set is returned if no matches are found
See Also:
WeldAnnotation.getAnnotatedMembers(Class)

getMember

public <A> WeldMethod<A,?> getMember(java.lang.String memberName,
                                     WeldClass<A> expectedType)
Description copied from interface: WeldAnnotation
Get an annotation member by name

Specified by:
getMember in interface WeldAnnotation<T extends java.lang.annotation.Annotation>
Returns:

toString

public java.lang.String toString()
Gets a string representation of the annotation

Overrides:
toString in class WeldClassImpl<T extends java.lang.annotation.Annotation>
Returns:
A string representation

getDelegate

public java.lang.Class<T> getDelegate()
Description copied from class: WeldClassImpl
Gets the delegate (class)

Overrides:
getDelegate in class WeldClassImpl<T extends java.lang.annotation.Annotation>
Returns:
The class


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