javax.enterprise.inject.spi
Interface Annotated

All Known Subinterfaces:
AnnotatedCallable<X>, AnnotatedConstructor<X>, AnnotatedField<X>, AnnotatedMember<X>, AnnotatedMethod<X>, AnnotatedParameter<X>, AnnotatedType<X>

public interface Annotated

Describes annotated member properties.

Version:
$Rev: 815435 $ $Date: 2009-09-15 20:18:44 +0200 (Tue, 15 Sep 2009) $

Method Summary
<T extends Annotation>
T
getAnnotation(Class<T> annotationType)
          Gets annotated element's annotation member if exist, null otherwise
 Set<Annotation> getAnnotations()
          Gets annotated member all annotations.
 Type getBaseType()
          Returns type of the element.
 Set<Type> getTypeClosure()
          Returns set of type closures.
 boolean isAnnotationPresent(Class<? extends Annotation> annotationType)
          Returns true if annotated member has annotation for given annotation type, false otherwise.
 

Method Detail

getBaseType

Type getBaseType()
Returns type of the element.

Returns:
type of the element

getTypeClosure

Set<Type> getTypeClosure()
Returns set of type closures. Type closure means that getBaseType() is assignable.

Returns:
set of type closures.

getAnnotation

<T extends Annotation> T getAnnotation(Class<T> annotationType)
Gets annotated element's annotation member if exist, null otherwise

Type Parameters:
T - generic annotatation class type
Parameters:
annotationType - class of the annotation
Returns:
annotated element's annotation member if exist, null otherwise

getAnnotations

Set<Annotation> getAnnotations()
Gets annotated member all annotations.

Returns:
annotated member annotations

isAnnotationPresent

boolean isAnnotationPresent(Class<? extends Annotation> annotationType)
Returns true if annotated member has annotation for given annotation type, false otherwise.

Parameters:
annotationType - type of the annotation
Returns:
true if annotated member has annotation for given annotation type


Copyright © 2003-2012 The Apache Software Foundation. All Rights Reserved.