Class NodeChange

java.lang.Object
com.vaadin.flow.internal.change.NodeChange
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
NodeAttachChange, NodeDetachChange, NodeFeatureChange

public abstract class NodeChange extends Object implements Serializable
Base class describing a change to a state node.

For internal use only. May be renamed or removed in a future release.

Since:
1.0
Author:
Vaadin Ltd
See Also:
  • Constructor Details

    • NodeChange

      public NodeChange(StateNode node)
      Creates a new change for the given node.
      Parameters:
      node - the changed node
  • Method Details

    • getNode

      public StateNode getNode()
      Gets the changed node.
      Returns:
      the node
    • toJson

      public elemental.json.JsonObject toJson(ConstantPool constantPool)
      Serializes this change to JSON.
      Parameters:
      constantPool - the constant pool to use for serializing constant pool references
      Returns:
      a json representation of this change
    • populateJson

      protected abstract void populateJson(elemental.json.JsonObject json, ConstantPool constantPool)
      Overridden by subclasses to populate a JSON object when serializing.
      Parameters:
      json - the json object to populate
      constantPool - the constant pool to use for serializing constant pool references