|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.pig.impl.plan.PlanVisitor<O,P>
public abstract class PlanVisitor<O extends Operator,P extends OperatorPlan<O>>
A visitor mechanism for navigating and operating on a plan of Operators. This class contains the logic to traverse the plan. It does not visit individual nodes. That is left to implementing classes (such as LOVisitor).
| Field Summary | |
|---|---|
protected PlanWalker<O,P> |
mCurrentWalker
Guaranteed to always point to the walker currently being used. |
protected P |
mPlan
|
| Constructor Summary | |
|---|---|
protected |
PlanVisitor(P plan,
PlanWalker<O,P> walker)
|
| Method Summary | |
|---|---|
P |
getPlan()
|
protected void |
popWalker()
Pop the next to previous walker off of the stack and set it as the current walker. |
protected void |
pushWalker(PlanWalker<O,P> walker)
Push the current walker onto the stack of saved walkers and begin using the newly passed walker as the current walker. |
void |
visit()
Entry point for visiting the plan. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected P extends OperatorPlan<O> mPlan
protected PlanWalker<O extends Operator,P extends OperatorPlan<O>> mCurrentWalker
| Constructor Detail |
|---|
protected PlanVisitor(P plan,
PlanWalker<O,P> walker)
plan - OperatorPlan this visitor will visit.walker - PlanWalker this visitor will use to traverse the plan.| Method Detail |
|---|
public void visit()
throws VisitorException
VisitorException - if an error is encountered while visiting.public P getPlan()
protected void pushWalker(PlanWalker<O,P> walker)
walker - new walker to set as the current walker.
protected void popWalker()
throws VisitorException
VisitorException - if there are no more walkers on the stack. In
this case the current walker is not reset.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||