Class NodeVisitor.Default<R>
java.lang.Object
software.amazon.smithy.model.node.NodeVisitor.Default<R>
- Type Parameters:
R
- Return type.
- All Implemented Interfaces:
NodeVisitor<R>
- Enclosing interface:
- NodeVisitor<R>
Creates
NodeVisitor
that return a default value when necessary
when visiting nodes.-
Nested Class Summary
Nested classes/interfaces inherited from interface software.amazon.smithy.model.node.NodeVisitor
NodeVisitor.Default<R>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionVisits an array node.booleanNode
(BooleanNode node) Visits a boolean node.protected abstract R
getDefault
(Node node) Returns a default value for any unhandled node.Visits a null node.numberNode
(NumberNode node) Visits a number node.objectNode
(ObjectNode node) Visits an object node.stringNode
(StringNode node) Visits a string node.
-
Constructor Details
-
Default
public Default()
-
-
Method Details
-
getDefault
Returns a default value for any unhandled node.- Parameters:
node
- Node that is being visited.- Returns:
- Return value.
-
arrayNode
Description copied from interface:NodeVisitor
Visits an array node.- Specified by:
arrayNode
in interfaceNodeVisitor<R>
- Parameters:
node
- Node to visit.- Returns:
- Return value of the visitor.
-
booleanNode
Description copied from interface:NodeVisitor
Visits a boolean node.- Specified by:
booleanNode
in interfaceNodeVisitor<R>
- Parameters:
node
- Node to visit.- Returns:
- Return value of the visitor.
-
nullNode
Description copied from interface:NodeVisitor
Visits a null node.- Specified by:
nullNode
in interfaceNodeVisitor<R>
- Parameters:
node
- Node to visit.- Returns:
- Return value of the visitor.
-
numberNode
Description copied from interface:NodeVisitor
Visits a number node.- Specified by:
numberNode
in interfaceNodeVisitor<R>
- Parameters:
node
- Node to visit.- Returns:
- Return value of the visitor.
-
objectNode
Description copied from interface:NodeVisitor
Visits an object node.- Specified by:
objectNode
in interfaceNodeVisitor<R>
- Parameters:
node
- Node to visit.- Returns:
- Return value of the visitor.
-
stringNode
Description copied from interface:NodeVisitor
Visits a string node.- Specified by:
stringNode
in interfaceNodeVisitor<R>
- Parameters:
node
- Node to visit.- Returns:
- Return value of the visitor.
-