Module org.glassfish.hk2.classmodel
Class AnnotatedElementImpl
java.lang.Object
org.glassfish.hk2.classmodel.reflect.impl.AnnotatedElementImpl
- All Implemented Interfaces:
AnnotatedElement
- Direct Known Subclasses:
FieldModelImpl,MethodModelImpl,ParameterImpl,TypeImpl
Implementation of an annotated element
- Author:
- Jerome Dochez
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAnnotation(String name) Returns an annotation model if the type is annotated with the passed annotation nameReturns a unmodifiable set of annotations that are present on this annotated element.getName()Annotated element have a name, which vary depending on the actual subclass type.booleanprotected voidprint(StringBuffer sb) voidsetApplicationClass(boolean applicationClass) Construct and return a short description name that can be used to display the instance valuetoString()
-
Constructor Details
-
AnnotatedElementImpl
-
-
Method Details
-
getName
Description copied from interface:AnnotatedElementAnnotated 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 fromClass.getName()- Specified by:
getNamein interfaceAnnotatedElement- Returns:
- the annotated element name
-
getAnnotations
Description copied from interface:AnnotatedElementReturns a unmodifiable set of annotations that are present on this annotated element.- Specified by:
getAnnotationsin interfaceAnnotatedElement- Returns:
- the collection of annotations
-
getAnnotation
Description copied from interface:AnnotatedElementReturns an annotation model if the type is annotated with the passed annotation name- Specified by:
getAnnotationin interfaceAnnotatedElement- Parameters:
name- the annotation name- Returns:
- the annotation model or null if the type is not annotated with this annotation type of the passed name.
-
isApplicationClass
public boolean isApplicationClass() -
setApplicationClass
public void setApplicationClass(boolean applicationClass) -
toString
-
shortDesc
Description copied from interface:AnnotatedElementConstruct and return a short description name that can be used to display the instance value- Specified by:
shortDescin interfaceAnnotatedElement- Returns:
- a short description
-
print
-