Top Description Methods
org.glassfish.hk2.classmodel.reflect

public Interface AnnotationModel

Known Direct Implementers
org.glassfish.hk2.classmodel.reflect.impl.AnnotationModelImpl
Imports
java.util.Map

Models an annotation instance
Author
Jerome Dochez

Method Summary

Modifier and TypeMethod and Description
public AnnotatedElement

Returns:

the annotated element
getElement
()

Returns the annotated element with this annotation instance

public AnnotationType

Returns:

the annotation type
getType
()

Returns the annotation type for this model

public <T> T

Returns:

the annotation value.
getValue
(String
the key whose associated value is to be returned
key
,
Class<T>
value type
type
,
Object
the default mapping of the key
defaultValue
)

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

public <T> T

Returns:

the annotation value.
getValue
(String
the key whose associated value is to be returned
key
,
Class<T>
value type
type
)

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

public Map<String, Object>

Returns:

collection of value elements of this annotation
getValues
()

Returns an unmodifiable collection of annotation values.

Method Detail

getElementback to summary
public AnnotatedElement getElement()

Returns the annotated element with this annotation instance

Returns:AnnotatedElement

the annotated element

getTypeback to summary
public AnnotationType getType()

Returns the annotation type for this model

Returns:AnnotationType

the annotation type

getValueback to summary
public <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

Parameters
key:String

the key whose associated value is to be returned

type:Class<T>

value type

defaultValue:Object

the default mapping of the key

Returns:T

the annotation value.

getValueback to summary
public <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

Parameters
key:String

the key whose associated value is to be returned

type:Class<T>

value type

Returns:T

the annotation value.

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

Returns an unmodifiable collection of annotation values.

Returns:Map<String, Object>

collection of value elements of this annotation