Class AnnotationState

  • All Implemented Interfaces:
    Memento

    public class AnnotationState
    extends Object
    implements Memento
    Stores state parameters for annotation objects to be used in conjunction with a care taker as part of the memento pattern.
    Since:
    4.0
    • Constructor Detail

      • AnnotationState

        public AnnotationState​(AnnotationComponent annotationComponent,
                               AnnotationState.Operation operation)
        Stores the annotation state associated with the AnnotationComponents annotation object. When a new instance of this object is created the annotation's properties are saved.
        Parameters:
        annotationComponent - annotation component whose state will be stored.
        operation - The operation applied to the annotation
    • Method Detail

      • restore

        public void restore()
        Restores the AnnotationComponents state to the state stored during the construction of this object.
        Specified by:
        restore in interface Memento
      • synchronizeState

        public void synchronizeState()