org.teiid.language.visitor
Class DelegatingHierarchyVisitor
java.lang.Object
org.teiid.language.visitor.AbstractLanguageVisitor
org.teiid.language.visitor.HierarchyVisitor
org.teiid.language.visitor.DelegatingHierarchyVisitor
- All Implemented Interfaces:
- LanguageObjectVisitor
public class DelegatingHierarchyVisitor
- extends HierarchyVisitor
Delegates pre- and post-processing for each node in the hierarchy to
delegate visitors.
| Methods inherited from class org.teiid.language.visitor.HierarchyVisitor |
visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DelegatingHierarchyVisitor
public DelegatingHierarchyVisitor(LanguageObjectVisitor preProcessingDelegate,
LanguageObjectVisitor postProcessingDelegate)
getPostVisitor
protected LanguageObjectVisitor getPostVisitor()
getPreVisitor
protected LanguageObjectVisitor getPreVisitor()
visitNode
public void visitNode(LanguageObject obj)
- Description copied from class:
AbstractLanguageVisitor
- Visit the ILanguageObject instance to perform the Visitor's operation on
that instance. This method can also be used by the subclass to visit any
ILanguageObject instances that the given instance may contain.
- Overrides:
visitNode in class AbstractLanguageVisitor
- Parameters:
obj - an ILanguageObject instance- See Also:
HierarchyVisitor
preOrderVisit
public static void preOrderVisit(LanguageObjectVisitor behaviorVisitor,
LanguageObject object)
- This utility method can be used to execute the behaviorVisitor in a pre-order walk
of the language objects. "Pre-order" in this case means that the visit method of the
behaviorVisitor will be called before the visit method of it's children. It is expected
that the behavior visit does NOT perform iteration, as that function will be performed
by the HierarchyVisitor.
- Parameters:
behaviorVisitor - The visitor specifying what behavior is performed at each node typeobject - The root of the object tree to perform visitation on
postOrderVisit
public static void postOrderVisit(LanguageObjectVisitor behaviorVisitor,
LanguageObject object)
- This utility method can be used to execute the behaviorVisitor in a post-order walk
of the language objects. "Post-order" in this case means that the visit method of the
behaviorVisitor will be called after the visit method of it's children. It is expected
that the behavior visit does NOT perform iteration, as that function will be performed
by the HierarchyVisitor.
- Parameters:
behaviorVisitor - The visitor specifying what behavior is performed at each node typeobject - The root of the object tree to perform visitation on
Copyright © 2011. All Rights Reserved.