Top Description Methods
org.glassfish.hk2.classmodel.reflect

public Interface AnnotatedElement

Known Direct Subinterfaces
org.glassfish.hk2.classmodel.reflect.FieldModel, org.glassfish.hk2.classmodel.reflect.MethodModel, org.glassfish.hk2.classmodel.reflect.Parameter, org.glassfish.hk2.classmodel.reflect.Type
Known Direct Implementers
org.glassfish.hk2.classmodel.reflect.impl.AnnotatedElementImpl
Imports
java.util.Collection

An annotated element is a java declaration that can be annotated. Such declaration are usually types (like classes or interfaces), fields of a class, or methods of a class. An annotated element is defined by its name and the set of annotations present on the declaration.
Author
Jerome Dochez

Method Summary

Modifier and TypeMethod and Description
public AnnotationModel

Returns:

the annotation model or null if the type is not annotated with this annotation type of the passed name.
getAnnotation
(String
the annotation name
name
)

Returns an annotation model if the type is annotated with the passed annotation name

public Collection<AnnotationModel>

Returns:

the collection of annotations
getAnnotations
()

Returns a unmodifiable set of annotations that are present on this annotated element.

public String

Returns:

the annotated element name
getName
()

Annotated element have a name, which vary depending on the actual subclass type.

public String

Returns:

a short description
shortDesc
()

Construct and return a short description name that can be used to display the instance value

Method Detail

getAnnotationback to summary
public AnnotationModel getAnnotation(String name)

Returns an annotation model if the type is annotated with the passed annotation name

Parameters
name:String

the annotation name

Returns:AnnotationModel

the annotation model or null if the type is not annotated with this annotation type of the passed name.

getAnnotationsback to summary
public Collection<AnnotationModel> getAnnotations()

Returns a unmodifiable set of annotations that are present on this annotated element.

Returns:Collection<AnnotationModel>

the collection of annotations

getNameback to summary
public String getName()

Annotated element have a name, which vary depending on the actual subclass type. For instance, a class annotated element's name is the class name as obtained from Class#getName()

Returns:String

the annotated element name

shortDescback to summary
public String shortDesc()

Construct and return a short description name that can be used to display the instance value

Returns:String

a short description