Class AnnotationModelImpl
- java.lang.Object
-
- org.glassfish.hk2.classmodel.reflect.impl.AnnotationModelImpl
-
- All Implemented Interfaces:
AnnotationModel
public class AnnotationModelImpl extends java.lang.Object implements AnnotationModel
Model a annotation instance
-
-
Field Summary
Fields Modifier and Type Field Description (package private) AnnotatedElement
element
(package private) AnnotationType
type
private java.util.Map<java.lang.String,java.lang.Object>
values
-
Constructor Summary
Constructors Constructor Description AnnotationModelImpl(AnnotatedElement element, AnnotationType type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addValue(java.lang.String name, java.lang.Object value)
AnnotatedElement
getElement()
Returns the annotated element with this annotation instanceAnnotationType
getType()
Returns the annotation type for this modeljava.util.Map<java.lang.String,java.lang.Object>
getValues()
Returns an unmodifiable collection of annotation values.java.lang.String
toString()
private java.lang.Object
unwrap(java.lang.Object value)
-
-
-
Field Detail
-
type
final AnnotationType type
-
element
final AnnotatedElement element
-
values
private final java.util.Map<java.lang.String,java.lang.Object> values
-
-
Constructor Detail
-
AnnotationModelImpl
public AnnotationModelImpl(AnnotatedElement element, AnnotationType type)
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
addValue
public void addValue(java.lang.String name, java.lang.Object value)
-
unwrap
private java.lang.Object unwrap(java.lang.Object value)
-
getValues
public java.util.Map<java.lang.String,java.lang.Object> getValues()
Description copied from interface:AnnotationModel
Returns an unmodifiable collection of annotation values.- Specified by:
getValues
in interfaceAnnotationModel
- Returns:
- collection of value elements of this annotation
-
getType
public AnnotationType getType()
Description copied from interface:AnnotationModel
Returns the annotation type for this model- Specified by:
getType
in interfaceAnnotationModel
- Returns:
- the annotation type
-
getElement
public AnnotatedElement getElement()
Description copied from interface:AnnotationModel
Returns the annotated element with this annotation instance- Specified by:
getElement
in interfaceAnnotationModel
- Returns:
- the annotated element
-
-