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 Object implements NodeVisitor<R>
Creates NodeVisitor that return a default value when necessary when visiting nodes.
  • Constructor Details

    • Default

      public Default()
  • Method Details

    • 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 interface NodeVisitor<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 interface NodeVisitor<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 interface NodeVisitor<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 interface NodeVisitor<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 interface NodeVisitor<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 interface NodeVisitor<R>
      Parameters:
      node - Node to visit.
      Returns:
      Return value of the visitor.