public class AnnotationModelImpl extends Object implements AnnotationModel
| Constructor and Description |
|---|
AnnotationModelImpl(AnnotatedElement element,
AnnotationType type) |
| Modifier and Type | Method and Description |
|---|---|
void |
addValue(String name,
Object value) |
AnnotatedElement |
getElement()
Returns the annotated element with this annotation instance
|
AnnotationType |
getType()
Returns the annotation type for this model
|
<T> T |
getValue(String key,
Class<T> type)
Returns the value to which the key is mapped or annotation default value if
mapping not found
|
<T> T |
getValue(String key,
Class<T> type,
Object defaultValue)
Returns the value to which the key is mapped or specified default value if
mapping not found
|
Map<String,Object> |
getValues()
Returns an unmodifiable collection of annotation values.
|
String |
toString() |
public AnnotationModelImpl(AnnotatedElement element, AnnotationType type)
public Map<String,Object> getValues()
AnnotationModelgetValues in interface AnnotationModelpublic <T> T getValue(String key, Class<T> type, Object defaultValue)
AnnotationModelgetValue in interface AnnotationModelkey - the key whose associated value is to be returnedtype - value typedefaultValue - the default mapping of the keypublic <T> T getValue(String key, Class<T> type)
AnnotationModelgetValue in interface AnnotationModelkey - the key whose associated value is to be returnedtype - value typepublic AnnotationType getType()
AnnotationModelgetType in interface AnnotationModelpublic AnnotatedElement getElement()
AnnotationModelgetElement in interface AnnotationModelCopyright © 2009–2022 Oracle Corporation. All rights reserved.