Top Description Methods
javax.enterprise.inject.spi

public Interface AnnotatedType<X>

extends Annotated
Type Parameters
<X>
the type
Imports
java.lang.annotation.Annotation, java.util.LinkedHashSet, .Set

Represents a Java class or interface.

Authors
Gavin King, Pete Muir
See Also
java.lang.Class

Method Summary

Modifier and TypeMethod and Description
public default <T extends Annotation> Set<T>
getAnnotations(Class<T>
the class of the annotation type
annotationType
)

Implements javax.enterprise.inject.spi.Annotated.getAnnotations.

Get program element annotations of a certain annotation type.

public Set<AnnotatedConstructor<X>>

Returns:

the constructors, or an empty set if none are defined
getConstructors
()

Get the constructors of the type.

public Set<AnnotatedField<? super X>>

Returns:

the fields, or an empty set if none are defined
getFields
()

Get the fields of the type.

public Class<X>

Returns:

the java.lang.Class
getJavaClass
()

Get the underlying java.lang.Class.

public Set<AnnotatedMethod<? super X>>

Returns:

the methods, or an empty set if none are defined
getMethods
()

Get the methods of the type.

Inherited from javax.enterprise.inject.spi.Annotated:
getAnnotationgetAnnotationsgetBaseTypegetTypeClosureisAnnotationPresent

Method Detail

getAnnotationsback to summary
public default <T extends Annotation> Set<T> getAnnotations(Class<T> annotationType)

Implements javax.enterprise.inject.spi.Annotated.getAnnotations.

Doc from javax.enterprise.inject.spi.Annotated.getAnnotations.

Get program element annotations of a certain annotation type.

This method returns back all annotations, including repeatable annotations of this type. The behavior of this method is intended to be the same behavior as AnnotatedElement#getAnnotationsByType(Class), where repeatable annotations are supported.

Parameters
<T>
the type of the annotation
annotationType:Class<T>

the class of the annotation type

Returns:Set<T>

the program element annotations of the given annotation type, or an empty collection

Annotations
@Override
getConstructorsback to summary
public Set<AnnotatedConstructor<X>> getConstructors()

Get the constructors of the type. If an empty set is returned, a default constructor with no parameters will be assumed.

Returns:Set<AnnotatedConstructor<X>>

the constructors, or an empty set if none are defined

getFieldsback to summary
public Set<AnnotatedField<? super X>> getFields()

Get the fields of the type.

Returns:Set<AnnotatedField<? super X>>

the fields, or an empty set if none are defined

getJavaClassback to summary
public Class<X> getJavaClass()

Get the underlying java.lang.Class.

Returns:Class<X>

the java.lang.Class

getMethodsback to summary
public Set<AnnotatedMethod<? super X>> getMethods()

Get the methods of the type.

Returns:Set<AnnotatedMethod<? super X>>

the methods, or an empty set if none are defined