org.jboss.weld.introspector
Class ForwardingWeldAnnotated<T,S>

java.lang.Object
  extended by org.jboss.weld.introspector.ForwardingAnnotated
      extended by org.jboss.weld.introspector.ForwardingWeldAnnotated<T,S>
Type Parameters:
T -
S -
All Implemented Interfaces:
javax.enterprise.inject.spi.Annotated, WeldAnnotated<T,S>
Direct Known Subclasses:
ForwardingWeldClass, ForwardingWeldMember, ForwardingWeldParameter

public abstract class ForwardingWeldAnnotated<T,S>
extends ForwardingAnnotated
implements WeldAnnotated<T,S>

Provides an abstraction for delegating access to an annotated item

Author:
Pete Muir

Field Summary
 
Fields inherited from interface org.jboss.weld.introspector.WeldAnnotated
MAPPED_DECLARED_METAANNOTATIONS, MAPPED_METAANNOTATIONS
 
Constructor Summary
ForwardingWeldAnnotated()
           
 
Method Summary
protected abstract  WeldAnnotated<T,S> delegate()
           
 Type[] getActualTypeArguments()
          Gets the actual type arguments for any parameterized types that this AnnotatedItem represents.
 Annotation[] getBindingsAsArray()
          Deprecated. 
 Set<Type> getInterfaceClosure()
          Get the type hierarchy of any interfaces implemented by this class.
 Class<T> getJavaClass()
          Gets the type of the element
 Set<Annotation> getMetaAnnotations(Class<? extends Annotation> metaAnnotationType)
          Gets all annotations which are annotated with the given meta annotation type
 String getName()
          Gets the name of this AnnotatedItem

If it is not possible to determine the name of the underling element, a IllegalArgumentException is thrown

 Package getPackage()
           
 Set<Annotation> getQualifiers()
          Deprecated. 
 boolean isFinal()
          Indicates if this AnnotatedItem represents a final element
 boolean isGeneric()
           
 boolean isPackagePrivate()
           
 boolean isParameterizedType()
           
 boolean isPrimitive()
           
 boolean isPrivate()
           
 boolean isPublic()
          Indicates if this annotated item is public
 boolean isStatic()
          Indicates if this AnnotatedItem represents a static element
 
Methods inherited from class org.jboss.weld.introspector.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
 

Constructor Detail

ForwardingWeldAnnotated

public ForwardingWeldAnnotated()
Method Detail

getActualTypeArguments

public Type[] getActualTypeArguments()
Description copied from interface: WeldAnnotated
Gets the actual type arguments for any parameterized types that this AnnotatedItem represents.

Specified by:
getActualTypeArguments in interface WeldAnnotated<T,S>
Returns:
An array of type arguments

getMetaAnnotations

public Set<Annotation> getMetaAnnotations(Class<? extends Annotation> metaAnnotationType)
Description copied from interface: WeldAnnotated
Gets all annotations which are annotated with the given meta annotation type

Specified by:
getMetaAnnotations in interface WeldAnnotated<T,S>
Returns:
A set of matching meta-annotations. Returns an empty set if there are no matches.

getQualifiers

@Deprecated
public Set<Annotation> getQualifiers()
Deprecated. 

Description copied from interface: WeldAnnotated
Gets the binding types for this element

Specified by:
getQualifiers in interface WeldAnnotated<T,S>

getBindingsAsArray

@Deprecated
public Annotation[] getBindingsAsArray()
Deprecated. 

Description copied from interface: WeldAnnotated
Gets the binding types for this element

Specified by:
getBindingsAsArray in interface WeldAnnotated<T,S>

getName

public String getName()
Description copied from interface: WeldAnnotated
Gets the name of this AnnotatedItem

If it is not possible to determine the name of the underling element, a IllegalArgumentException is thrown

Specified by:
getName in interface WeldAnnotated<T,S>
Returns:
The name

getJavaClass

public Class<T> getJavaClass()
Description copied from interface: WeldAnnotated
Gets the type of the element

Specified by:
getJavaClass in interface WeldAnnotated<T,S>
Returns:
The type of the element

isFinal

public boolean isFinal()
Description copied from interface: WeldAnnotated
Indicates if this AnnotatedItem represents a final element

Specified by:
isFinal in interface WeldAnnotated<T,S>
Returns:
True if final, false otherwise

isStatic

public boolean isStatic()
Description copied from interface: WeldAnnotated
Indicates if this AnnotatedItem represents a static element

Specified by:
isStatic in interface WeldAnnotated<T,S>
Returns:
True if static, false otherwise

isGeneric

public boolean isGeneric()
Specified by:
isGeneric in interface WeldAnnotated<T,S>

isPublic

public boolean isPublic()
Description copied from interface: WeldAnnotated
Indicates if this annotated item is public

Specified by:
isPublic in interface WeldAnnotated<T,S>
Returns:
if public, returns true

isPrivate

public boolean isPrivate()
Specified by:
isPrivate in interface WeldAnnotated<T,S>

isPackagePrivate

public boolean isPackagePrivate()
Specified by:
isPackagePrivate in interface WeldAnnotated<T,S>

getPackage

public Package getPackage()
Specified by:
getPackage in interface WeldAnnotated<T,S>

delegate

protected abstract WeldAnnotated<T,S> delegate()
Specified by:
delegate in class ForwardingAnnotated

getInterfaceClosure

public Set<Type> getInterfaceClosure()
Description copied from interface: WeldAnnotated
Get the type hierarchy of any interfaces implemented by this class.

The returned types should have any type parameters resolved to their actual types.

There is no guarantee this methods executes in O(1) time

Specified by:
getInterfaceClosure in interface WeldAnnotated<T,S>
Returns:
the type hierarchy

isParameterizedType

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

isPrimitive

public boolean isPrimitive()
Specified by:
isPrimitive in interface WeldAnnotated<T,S>


Copyright © 2013 Seam Framework. All Rights Reserved.