Class AnnotationChanger

All Implemented Interfaces:
Serializable, Annotation, Changeable

AnnotationChanger remaps the values of an Annotation to new values specified by a ValueChanger. This will modify the values associated with properties, but not the property names. For writing light-weigth adaptors to project one type of Annotation to another using a ChangeTable.
Since:
1.3
Author:
Matthew Pocock
See Also:
  • Constructor Details

    • AnnotationChanger

      public AnnotationChanger(Annotation wrapped, ChangeTable changer)
      Creates a new AnnotationChanger using the specified ValueChanger to remap its values.
      Parameters:
      wrapped - an Annotation.
      changer - a ValueChanger.
  • Method Details

    • getWrapped

      getWrapped returns the Annotation being remapped.
      Returns:
      an Annotation.
    • getChanger

      getMapper returns the ValueChanger being used to remap the Annotation.
      Returns:
      a ValueChanger.
    • getProperties

      public Map getProperties()
      getProperties returns the mapped contents of the underlying Annotation as a Map.
      Specified by:
      getProperties in class AbstractAnnotation
      Returns:
      a Map.
    • propertiesAllocated

      public boolean propertiesAllocated()
      propertiesAllocated is a convenience method to see if we have allocated the properties Map.
      Specified by:
      propertiesAllocated in class AbstractAnnotation
      Returns:
      a boolean true if the properties have been allocated, false otherwise.