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) AnnotatedElementelement(package private) AnnotationTypetypeprivate 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 voidaddValue(java.lang.String name, java.lang.Object value)AnnotatedElementgetElement()Returns the annotated element with this annotation instanceAnnotationTypegetType()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.StringtoString()private java.lang.Objectunwrap(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:
toStringin 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:AnnotationModelReturns an unmodifiable collection of annotation values.- Specified by:
getValuesin interfaceAnnotationModel- Returns:
- collection of value elements of this annotation
-
getType
public AnnotationType getType()
Description copied from interface:AnnotationModelReturns the annotation type for this model- Specified by:
getTypein interfaceAnnotationModel- Returns:
- the annotation type
-
getElement
public AnnotatedElement getElement()
Description copied from interface:AnnotationModelReturns the annotated element with this annotation instance- Specified by:
getElementin interfaceAnnotationModel- Returns:
- the annotated element
-
-