Package org.smooks.api.memento
Interface Memento
-
- All Known Implementing Classes:
AbstractVisitorMemento
,ConsumeSerializerVisitor.ElementMemento
,SimpleVisitorMemento
,TextAccumulatorMemento
,TextAccumulatorVisitorMemento
,VisitorMemento
public interface Memento
Holds the state of aVisitor
.A
Memento
is saved and restored it at a later stage. AMemento
is bound to aVisitor
> and its fragment (e.g.,
Fragment
). Management ofMemento
s should be delegated toMementoCaretaker
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Memento
copy()
Performs a deep clone of thisMemento
.String
getAnchor()
Gets the anchor value of thisMemento
.Fragment<?>
getFragment()
void
restore(Memento memento)
Combines aMemento
state with thisMemento
-
-
-
Method Detail
-
copy
Memento copy()
Performs a deep clone of thisMemento
.- Returns:
- a deep clone of this
Memento
-
restore
void restore(Memento memento)
Combines aMemento
state with thisMemento
- Parameters:
memento
- theMemento
restoring thisMemento
-
getFragment
Fragment<?> getFragment()
- Returns:
- the fragment which this
Memento
is bound to
-
getAnchor
String getAnchor()
Gets the anchor value of thisMemento
.Memento
s with equal anchor values are considered to be capturing the state of the same object but at different points in time.- Returns:
- the ID of this
Memento
-
-