• All Implemented Interfaces:
    Serializable, Annotation, Changeable

    public class AnnotationChanger
    extends AbstractAnnotation

    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:
    Serialized Form
    • Constructor Detail

      • 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 Detail

      • getWrapped

        public Annotation getWrapped()

        getWrapped returns the Annotation being remapped.

        Returns:
        an Annotation.
      • getChanger

        public ChangeTable getChanger()

        getMapper returns the ValueChanger being used to remap the Annotation.

        Returns:
        a ValueChanger.
      • 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.