org.deft.extension.tools.astmodifier.syntax
Class SyntaxCheckerVisitor

java.lang.Object
  extended by org.deft.extension.tools.astmodifier.syntax.SyntaxCheckerVisitor
Direct Known Subclasses:
NoSyntaxCheckerVisitor

public abstract class SyntaxCheckerVisitor
extends java.lang.Object

Visitor to check if a TreeNode could be inserted syntactical correct under an other.

Author:
Martin Heinzerling

Constructor Summary
SyntaxCheckerVisitor()
           
 
Method Summary
abstract  boolean check(org.deft.repository.ast.TreeNode parent, org.deft.repository.ast.TreeNode insert, int insertAt)
          Checks if a insertion is syntactical correct.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SyntaxCheckerVisitor

public SyntaxCheckerVisitor()
Method Detail

check

public abstract boolean check(org.deft.repository.ast.TreeNode parent,
                              org.deft.repository.ast.TreeNode insert,
                              int insertAt)
Checks if a insertion is syntactical correct.

Parameters:
parent - TreeNode parent node
insert - TreeNode node to insert
insertAt - int index of position in parents childs
Returns:
true if insertion is syntactical correct.