Class StateMemoizer

java.lang.Object
com.flowingcode.vaadin.addons.xterm.utils.StateMemoizer
All Implemented Interfaces:
Serializable

public class StateMemoizer extends Object implements Serializable
Remembers the values passed to all setters. At any time you can reapply those calls by using apply().
See Also:
  • Constructor Details

    • StateMemoizer

      public StateMemoizer(Object delegate, Class<?>... interfaces)
      Creates the memoizer. Remember to invoke interface methods via getProxy() in order for this to work.
      Parameters:
      delegate - pass-through the setters here.
      interfaces - used to create the memoizing proxy.
  • Method Details

    • getProxy

      public Object getProxy()
      Setters invoked on this proxy will have the args remembered; the methods invocations will then be passed on to delegate.
      Returns:
      the proxy, not null.
    • apply

      public void apply()
      Calls all setters again on delegate.