Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.singularsys.jep.walkers
Class DeepCopyVisitor

    java.lang.Object
      com.singularsys.jep.walkers.DoNothingVisitor
          com.singularsys.jep.walkers.DeepCopyVisitor

All Implemented Interfaces:
  ParserVisitor

    public class DeepCopyVisitor

extends DoNothingVisitor

A Visitor which returns an exact copy of the tree. This class should be extended by visitors which modify trees and creates a new tree.

Author:
  Rich Morris Created on 16-Nov-2003

Field Summary
`protected Jep` | `jep`

Fields inherited from class com.singularsys.jep.walkers.DoNothingVisitor
`ft, nf, ot, vt`

Constructor Summary
`DeepCopyVisitor(Jep j)`

Method Summary
`Node` | `deepCopy(Node node)` Creates a deepCopy of a Node
`java.lang.Object` | `visit(ASTConstant node, java.lang.Object data)` Visit a constant node.
`java.lang.Object` | `visit(ASTFunNode node, java.lang.Object data)` Visit a function node.
`java.lang.Object` | `visit(ASTOpNode node, java.lang.Object data)` Visit a operator node.
`java.lang.Object` | `visit(ASTVarNode node, java.lang.Object data)` Visit a variable node.

Methods inherited from class com.singularsys.jep.walkers.DoNothingVisitor
`copyChildrenIfNeeded, visit, visitChildren, visitNode`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### jep

    protected Jep jep

Constructor Detail

### DeepCopyVisitor

    public DeepCopyVisitor(Jep j)

Method Detail

### deepCopy

    public Node deepCopy(Node node)
                  throws JepException

  Creates a deepCopy of a Node

  Throws:
    `JepException`

### visit

    public java.lang.Object visit(ASTConstant node,
                                  java.lang.Object data)
                           throws JepException

  Description copied from class: `DoNothingVisitor`
  Visit a constant node. Can be overridden buy sub-classes.

  Specified by:
    `visit` in interface `ParserVisitor`
  Overrides:
    `visit` in class `DoNothingVisitor`
  Throws:
    `JepException`

### visit

    public java.lang.Object visit(ASTFunNode node,
                                  java.lang.Object data)
                           throws JepException

  Description copied from class: `DoNothingVisitor`
  Visit a function node. Can be overridden buy sub-classes.

  Specified by:
    `visit` in interface `ParserVisitor`
  Overrides:
    `visit` in class `DoNothingVisitor`
  Throws:
    `JepException`

### visit

    public java.lang.Object visit(ASTOpNode node,
                                  java.lang.Object data)
                           throws JepException

  Description copied from class: `DoNothingVisitor`
  Visit a operator node. Can be overridden buy sub-classes.

  Specified by:
    `visit` in interface `ParserVisitor`
  Overrides:
    `visit` in class `DoNothingVisitor`
  Throws:
    `JepException`

### visit

    public java.lang.Object visit(ASTVarNode node,
                                  java.lang.Object data)
                           throws JepException

  Description copied from class: `DoNothingVisitor`
  Visit a variable node. Can be overridden buy sub-classes.

  Specified by:
    `visit` in interface `ParserVisitor`
  Overrides:
    `visit` in class `DoNothingVisitor`
  Throws:
    `JepException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2007 Singular Systems http://www.singularsys.com/jep