Class NullNode
java.lang.Object
software.amazon.smithy.model.node.Node
software.amazon.smithy.model.node.NullNode
- All Implemented Interfaces:
FromSourceLocation,ToNode
Represents a null node.
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.smithy.model.node.Node
Node.NonNumericFloat -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<R> Raccept(NodeVisitor<R> visitor) Accepts a visitor with the node.Gets the node as an NullNode if it is a null.booleanexpectNullNode(String errorMessage) Casts the current node to aNullNode, throwingExpectationNotMetExceptionwhen the node is the wrong type.expectNullNode(Supplier<String> errorMessage) Casts the current node to aNullNode, throwingExpectationNotMetExceptionwhen the node is the wrong type.getType()Gets the type of the node.inthashCode()toString()Methods inherited from class software.amazon.smithy.model.node.Node
arrayNode, arrayNode, asArrayNode, asBooleanNode, asNumberNode, asObjectNode, assertEquals, asStringNode, diff, expectArrayNode, expectArrayNode, expectArrayNode, expectBooleanNode, expectBooleanNode, expectBooleanNode, expectNullNode, expectNumberNode, expectNumberNode, expectNumberNode, expectObjectNode, expectObjectNode, expectObjectNode, expectStringNode, expectStringNode, expectStringNode, from, from, from, from, fromNodes, fromNodes, fromStrings, fromStrings, getSourceLocation, isArrayNode, isBooleanNode, isNullNode, isNumberNode, isObjectNode, isStringNode, loadArrayOfString, nullNode, objectNode, objectNode, objectNodeBuilder, parse, parse, parse, parse, parseJsonWithComments, parseJsonWithComments, prettyPrintJson, prettyPrintJson, printJson, toNode, withDeepSortedKeys, withDeepSortedKeys
-
Constructor Details
-
NullNode
-
-
Method Details
-
getType
Description copied from class:NodeGets the type of the node. -
accept
Description copied from class:NodeAccepts a visitor with the node. -
expectNullNode
Description copied from class:NodeCasts the current node to aNullNode, throwingExpectationNotMetExceptionwhen the node is the wrong type.- Overrides:
expectNullNodein classNode- Parameters:
errorMessage- Error message to use if the node is of the wrong type.- Returns:
- Returns a null node.
-
expectNullNode
Description copied from class:NodeCasts the current node to aNullNode, throwingExpectationNotMetExceptionwhen the node is the wrong type.- Overrides:
expectNullNodein classNode- Parameters:
errorMessage- Error message supplier.- Returns:
- Returns a null node.
-
asNullNode
Description copied from class:NodeGets the node as an NullNode if it is a null.- Overrides:
asNullNodein classNode- Returns:
- Returns the optional NullNode.
-
equals
-
hashCode
public int hashCode() -
toString
-