Top Description Fields Constructors Methods
org.glassfish.hk2.classmodel.reflect.impl

public Class AnnotationModelImpl

extends Object
implements AnnotationModel
Class Inheritance
All Implemented Interfaces
org.glassfish.hk2.classmodel.reflect.AnnotationModel
Imports
org.glassfish.hk2.classmodel.reflect.AnnotatedElement, .AnnotationModel, .AnnotationType, java.util.ArrayList, .Collection, .Collections, .HashMap, .Map

Model a annotation instance

Field Summary

Modifier and TypeField and Description
pack-priv final AnnotatedElement
pack-priv final AnnotationType
private final Map<String, Object>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
addValue(String name, Object value)

public AnnotatedElement
getElement()

Implements org.glassfish.hk2.classmodel.reflect.AnnotationModel.getElement.

Returns the annotated element with this annotation instance

public AnnotationType
getType()

Implements org.glassfish.hk2.classmodel.reflect.AnnotationModel.getType.

Returns the annotation type for this model

public <T> T
getValue(String key, Class<T> type, Object defaultValue)

Implements org.glassfish.hk2.classmodel.reflect.AnnotationModel.getValue.

Returns the value to which the key is mapped or specified default value if mapping not found

public <T> T
getValue(String key, Class<T> type)

Implements org.glassfish.hk2.classmodel.reflect.AnnotationModel.getValue.

Returns the value to which the key is mapped or annotation default value if mapping not found

public Map<String, Object>
getValues()

Implements org.glassfish.hk2.classmodel.reflect.AnnotationModel.getValues.

Returns an unmodifiable collection of annotation values.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

private Object
unwrap(Object value)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

elementback to summary
pack-priv final AnnotatedElement element
typeback to summary
pack-priv final AnnotationType type
valuesback to summary
private final Map<String, Object> values

Constructor Detail

AnnotationModelImplback to summary
public AnnotationModelImpl(AnnotatedElement element, AnnotationType type)

Method Detail

addValueback to summary
public void addValue(String name, Object value)
Annotations
@SuppressWarnings:unchecked
getElementback to summary
public AnnotatedElement getElement()

Implements org.glassfish.hk2.classmodel.reflect.AnnotationModel.getElement.

Doc from org.glassfish.hk2.classmodel.reflect.AnnotationModel.getElement.

Returns the annotated element with this annotation instance

Annotations
@Override
getTypeback to summary
public AnnotationType getType()

Implements org.glassfish.hk2.classmodel.reflect.AnnotationModel.getType.

Doc from org.glassfish.hk2.classmodel.reflect.AnnotationModel.getType.

Returns the annotation type for this model

Annotations
@Override
getValueback to summary
public <T> T getValue(String key, Class<T> type, Object defaultValue)

Implements org.glassfish.hk2.classmodel.reflect.AnnotationModel.getValue.

Doc from org.glassfish.hk2.classmodel.reflect.AnnotationModel.getValue.

Returns the value to which the key is mapped or specified default value if mapping not found

Annotations
@Override
getValueback to summary
public <T> T getValue(String key, Class<T> type)

Implements org.glassfish.hk2.classmodel.reflect.AnnotationModel.getValue.

Doc from org.glassfish.hk2.classmodel.reflect.AnnotationModel.getValue.

Returns the value to which the key is mapped or annotation default value if mapping not found

Annotations
@Override
getValuesback to summary
public Map<String, Object> getValues()

Implements org.glassfish.hk2.classmodel.reflect.AnnotationModel.getValues.

Doc from org.glassfish.hk2.classmodel.reflect.AnnotationModel.getValues.

Returns an unmodifiable collection of annotation values.

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override
unwrapback to summary
private Object unwrap(Object value)