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>
public abstract static class NodeVisitor.Default<R> extends java.lang.Object implements NodeVisitor<R>
CreatesNodeVisitor
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
Constructors Constructor Description Default()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description R
arrayNode(ArrayNode node)
Visits an array node.R
booleanNode(BooleanNode node)
Visits a boolean node.protected abstract R
getDefault(Node node)
Returns a default value for any unhandled node.R
nullNode(NullNode node)
Visits a null node.R
numberNode(NumberNode node)
Visits a number node.R
objectNode(ObjectNode node)
Visits an object node.R
stringNode(StringNode node)
Visits a string node.
-
-
-
Method Detail
-
getDefault
protected abstract R getDefault(Node node)
Returns a default value for any unhandled node.- Parameters:
node
- Node that is being visited.- Returns:
- Return value.
-
arrayNode
public R arrayNode(ArrayNode node)
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
public R booleanNode(BooleanNode node)
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
public R nullNode(NullNode node)
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
public R numberNode(NumberNode node)
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
public R objectNode(ObjectNode node)
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
public R stringNode(StringNode node)
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.
-
-