org.jboss.webbeans.introspector
Class ForwardingAnnotatedItem<T,S>

java.lang.Object
  extended by org.jboss.webbeans.introspector.ForwardingAnnotatedItem<T,S>
Type Parameters:
T -
S -
All Implemented Interfaces:
AnnotatedItem<T,S>

public abstract class ForwardingAnnotatedItem<T,S>
extends java.lang.Object
implements AnnotatedItem<T,S>

Provides an abstraction for delegating access to an annotated item

Author:
Pete Muir

Field Summary
 
Fields inherited from interface org.jboss.webbeans.introspector.AnnotatedItem
MAPPED_METAANNOTATIONS
 
Constructor Summary
ForwardingAnnotatedItem()
           
 
Method Summary
abstract  AnnotatedItem<T,S> delegate()
          Gets the annotated item
 boolean equals(java.lang.Object obj)
          Overridden method into delegate
 java.lang.reflect.Type[] getActualTypeArguments()
          Gets the actual type arguments for any parameterized types that this AnnotatedItem represents.
<A extends java.lang.annotation.Annotation>
A
getAnnotation(java.lang.Class<? extends A> annotationType)
          Gets an annotation for the annotation type specified.
<A extends java.lang.annotation.Annotation>
java.util.Set<A>
getAnnotations()
          Gets all annotations on the item
 java.util.Set<java.lang.annotation.Annotation> getBindingTypes()
          Gets the binding types for this element
 java.lang.annotation.Annotation[] getBindingTypesAsArray()
          Gets the binding types for this element
 java.util.Set<java.lang.annotation.Annotation> getMetaAnnotations(java.lang.Class<? extends java.lang.annotation.Annotation> metaAnnotationType)
          Gets all annotations which are annotated with the given meta annotation type
 java.lang.annotation.Annotation[] getMetaAnnotationsAsArray(java.lang.Class<? extends java.lang.annotation.Annotation> metaAnnotationType)
          Gets all annotations which are annotated with the given meta annotation type
 java.lang.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
 java.lang.Class<T> getType()
          Gets the type of the element
 int hashCode()
          Overridden method into delegate
 boolean isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
          Indicates if an annotation type specified is present
 boolean isAssignableFrom(AnnotatedItem<?,?> that)
          Extends Java Class assignability such that actual type parameters are also considered
 boolean isAssignableFrom(java.util.Set<java.lang.Class<?>> types)
          Checks if any of the types provided are assignable to this, using the extended assignability algorithm provided by AnnotatedItem.
 boolean isFinal()
          Indicates if this AnnotatedItem represents a final element
 boolean isProxyable()
          Indicates if this AnnotatedItem can be proxyed
 boolean isStatic()
          Indicates if this AnnotatedItem represents a static element
 java.lang.String toString()
          Overridden method into delegate
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ForwardingAnnotatedItem

public ForwardingAnnotatedItem()
Method Detail

getActualTypeArguments

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

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

getAnnotation

public <A extends java.lang.annotation.Annotation> A getAnnotation(java.lang.Class<? extends A> annotationType)
Description copied from interface: AnnotatedItem
Gets an annotation for the annotation type specified.

Specified by:
getAnnotation in interface AnnotatedItem<T,S>
Parameters:
annotationType - The annotation to match
Returns:
An annotation if found, null if the annotation wasn't present.
See Also:
AnnotatedItem

getAnnotations

public <A extends java.lang.annotation.Annotation> java.util.Set<A> getAnnotations()
Description copied from interface: AnnotatedItem
Gets all annotations on the item

Specified by:
getAnnotations in interface AnnotatedItem<T,S>
Returns:
A set of annotations. Returns an empty set if there are no matches.
See Also:
AnnotatedItem

getMetaAnnotations

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

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

getMetaAnnotationsAsArray

public java.lang.annotation.Annotation[] getMetaAnnotationsAsArray(java.lang.Class<? extends java.lang.annotation.Annotation> metaAnnotationType)
Description copied from interface: AnnotatedItem
Gets all annotations which are annotated with the given meta annotation type

Specified by:
getMetaAnnotationsAsArray in interface AnnotatedItem<T,S>
Returns:
An array of matching meta-annotations. Returns an empty array if there are no matches.
See Also:
AnnotatedItem

getBindingTypes

public java.util.Set<java.lang.annotation.Annotation> getBindingTypes()
Description copied from interface: AnnotatedItem
Gets the binding types for this element

Specified by:
getBindingTypes in interface AnnotatedItem<T,S>
See Also:
AnnotatedItem

getBindingTypesAsArray

public java.lang.annotation.Annotation[] getBindingTypesAsArray()
Description copied from interface: AnnotatedItem
Gets the binding types for this element

Specified by:
getBindingTypesAsArray in interface AnnotatedItem<T,S>
See Also:
AnnotatedItem

getName

public java.lang.String getName()
Description copied from interface: AnnotatedItem
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 AnnotatedItem<T,S>
Returns:
The name
See Also:
AnnotatedItem

getType

public java.lang.Class<T> getType()
Description copied from interface: AnnotatedItem
Gets the type of the element

Specified by:
getType in interface AnnotatedItem<T,S>
Returns:
The type of the element
See Also:
AnnotatedItem

isAnnotationPresent

public boolean isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Description copied from interface: AnnotatedItem
Indicates if an annotation type specified is present

Specified by:
isAnnotationPresent in interface AnnotatedItem<T,S>
Parameters:
annotationType - The annotation to match
Returns:
True if present, false if not
See Also:
AnnotatedItem

isAssignableFrom

public boolean isAssignableFrom(AnnotatedItem<?,?> that)
Description copied from interface: AnnotatedItem
Extends Java Class assignability such that actual type parameters are also considered

Specified by:
isAssignableFrom in interface AnnotatedItem<T,S>
Parameters:
that - The other item to check assignability against
Returns:
True if assignable, false otherwise.
See Also:
AnnotatedItem

isAssignableFrom

public boolean isAssignableFrom(java.util.Set<java.lang.Class<?>> types)
Description copied from interface: AnnotatedItem
Checks if any of the types provided are assignable to this, using the extended assignability algorithm provided by AnnotatedItem. The types are assumed to contain their own actual type parameterization.

Specified by:
isAssignableFrom in interface AnnotatedItem<T,S>
Parameters:
types - The set of types to match
Returns:
True if assignable, false otherwise.
See Also:
AnnotatedItem

isFinal

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

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

isStatic

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

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

isProxyable

public boolean isProxyable()
Description copied from interface: AnnotatedItem
Indicates if this AnnotatedItem can be proxyed

Specified by:
isProxyable in interface AnnotatedItem<T,S>
Returns:
True if proxyable, false otherwise
See Also:
AnnotatedItem

equals

public boolean equals(java.lang.Object obj)
Overridden method into delegate

Overrides:
equals in class java.lang.Object
See Also:
AnnotatedItem

hashCode

public int hashCode()
Overridden method into delegate

Overrides:
hashCode in class java.lang.Object
See Also:
AnnotatedItem

toString

public java.lang.String toString()
Overridden method into delegate

Overrides:
toString in class java.lang.Object
See Also:
AnnotatedItem

delegate

public abstract AnnotatedItem<T,S> delegate()
Gets the annotated item

Returns:
The annotated item


Copyright © 2008. All Rights Reserved.