R
- Return type.public abstract static class NodeVisitor.Default<R> extends java.lang.Object implements NodeVisitor<R>
NodeVisitor
that return a default value when necessary
when visiting nodes.NodeVisitor.Default<R>
Constructor and Description |
---|
Default() |
Modifier and Type | Method and 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.
|
protected abstract R getDefault(Node node)
node
- Node that is being visited.public R arrayNode(ArrayNode node)
NodeVisitor
arrayNode
in interface NodeVisitor<R>
node
- Node to visit.public R booleanNode(BooleanNode node)
NodeVisitor
booleanNode
in interface NodeVisitor<R>
node
- Node to visit.public R nullNode(NullNode node)
NodeVisitor
nullNode
in interface NodeVisitor<R>
node
- Node to visit.public R numberNode(NumberNode node)
NodeVisitor
numberNode
in interface NodeVisitor<R>
node
- Node to visit.public R objectNode(ObjectNode node)
NodeVisitor
objectNode
in interface NodeVisitor<R>
node
- Node to visit.public R stringNode(StringNode node)
NodeVisitor
stringNode
in interface NodeVisitor<R>
node
- Node to visit.