Package com.vaadin.flow.internal.change
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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description NodeChange(StateNode node)Creates a new change for the given node.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description StateNodegetNode()Gets the changed node.protected abstract voidpopulateJson(elemental.json.JsonObject json, ConstantPool constantPool)Overridden by subclasses to populate a JSON object when serializing.elemental.json.JsonObjecttoJson(ConstantPool constantPool)Serializes this change to JSON.
-
-
-
Constructor Detail
-
NodeChange
public NodeChange(StateNode node)
Creates a new change for the given node.- Parameters:
node- the changed node
-
-
Method Detail
-
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 populateconstantPool- the constant pool to use for serializing constant pool references
-
-