Interface AnnotationModel

All Known Implementing Classes:
AnnotationModelImpl

public interface AnnotationModel
Models an annotation instance
Author:
Jerome Dochez
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the annotated element with this annotation instance
    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
    Returns an unmodifiable collection of annotation values.
  • Method Details

    • getType

      AnnotationType getType()
      Returns the annotation type for this model
      Returns:
      the annotation type
    • getElement

      AnnotatedElement getElement()
      Returns the annotated element with this annotation instance
      Returns:
      the annotated element
    • getValues

      Map<String,Object> getValues()
      Returns an unmodifiable collection of annotation values.
      Returns:
      collection of value elements of this annotation
    • getValue

      <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 - the key whose associated value is to be returned
      type - value type
      defaultValue - the default mapping of the key
      Returns:
      the annotation value.
    • getValue

      <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 - the key whose associated value is to be returned
      type - value type
      Returns:
      the annotation value.