Class AnnotationModelImpl

java.lang.Object
org.glassfish.hk2.classmodel.reflect.impl.AnnotationModelImpl
All Implemented Interfaces:
AnnotationModel

public class AnnotationModelImpl extends Object implements AnnotationModel
Model a annotation instance
  • Constructor Details

  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • addValue

      public void addValue(String name, Object value)
    • getValues

      public Map<String,Object> getValues()
      Description copied from interface: AnnotationModel
      Returns an unmodifiable collection of annotation values.
      Specified by:
      getValues in interface AnnotationModel
      Returns:
      collection of value elements of this annotation
    • getValue

      public <T> T getValue(String key, Class<T> type, Object defaultValue)
      Description copied from interface: AnnotationModel
      Returns the value to which the key is mapped or specified default value if mapping not found
      Specified by:
      getValue in interface AnnotationModel
      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

      public <T> T getValue(String key, Class<T> type)
      Description copied from interface: AnnotationModel
      Returns the value to which the key is mapped or annotation default value if mapping not found
      Specified by:
      getValue in interface AnnotationModel
      Parameters:
      key - the key whose associated value is to be returned
      type - value type
      Returns:
      the annotation value.
    • getType

      public AnnotationType getType()
      Description copied from interface: AnnotationModel
      Returns the annotation type for this model
      Specified by:
      getType in interface AnnotationModel
      Returns:
      the annotation type
    • getElement

      public AnnotatedElement getElement()
      Description copied from interface: AnnotationModel
      Returns the annotated element with this annotation instance
      Specified by:
      getElement in interface AnnotationModel
      Returns:
      the annotated element