Class AnnotatedElementImpl
java.lang.Object
org.glassfish.hk2.classmodel.reflect.impl.AnnotatedElementImpl
- All Implemented Interfaces:
AnnotatedElement
- Direct Known Subclasses:
FieldModelImpl
,MethodModelImpl
,TypeImpl
Implementation of an annotated element
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List
<AnnotationModel> private boolean
private final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) void
addAnnotation
(AnnotationModel annotation) getAnnotation
(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.boolean
protected void
print
(StringBuffer sb) void
setApplicationClass
(boolean applicationClass) Construct and return a short description name that can be used to display the instance valuetoString()
-
Field Details
-
name
-
annotations
-
isApplicationClass
private boolean isApplicationClass
-
-
Constructor Details
-
AnnotatedElementImpl
-
-
Method Details
-
getName
Description copied from interface:AnnotatedElement
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 fromClass.getName()
- Specified by:
getName
in interfaceAnnotatedElement
- Returns:
- the annotated element name
-
addAnnotation
-
getAnnotations
Description copied from interface:AnnotatedElement
Returns a unmodifiable set of annotations that are present on this annotated element.- Specified by:
getAnnotations
in interfaceAnnotatedElement
- Returns:
- the collection of annotations
-
getAnnotation
Description copied from interface:AnnotatedElement
Returns an annotation model if the type is annotated with the passed annotation name- Specified by:
getAnnotation
in 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:AnnotatedElement
Construct and return a short description name that can be used to display the instance value- Specified by:
shortDesc
in interfaceAnnotatedElement
- Returns:
- a short description
-
print
-