Class TextExprPrinter.Visitor
- java.lang.Object
-
- ru.ispras.fortress.expression.ExprTreeVisitorDefault
-
- ru.ispras.fortress.expression.printer.MapBasedPrinter.ExprTreeVisitor
-
- ru.ispras.fortress.expression.printer.TextExprPrinter.Visitor
-
- All Implemented Interfaces:
ExprTreeVisitor
,TreeVisitor
- Enclosing class:
- TextExprPrinter
protected class TextExprPrinter.Visitor extends MapBasedPrinter.ExprTreeVisitor
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface ru.ispras.fortress.util.TreeVisitor
TreeVisitor.Status
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Visitor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int[]
getOperandOrder()
Returns an array of operand indexes that specify in which order the operands of the currently visited operator should be visited.void
onOperandBegin(NodeOperation expr, Node operand, int index)
Notifies that visiting an expression operand has started.void
onOperationBegin(NodeOperation expr)
Starts visiting an operation node.void
onOperationEnd(NodeOperation expr)
Finishes visiting an operation node.-
Methods inherited from class ru.ispras.fortress.expression.printer.MapBasedPrinter.ExprTreeVisitor
appendText, onValue, onVariable, toString
-
Methods inherited from class ru.ispras.fortress.expression.ExprTreeVisitorDefault
getStatus, onBegin, onBindingBegin, onBindingEnd, onBindingListEnd, onBoundVariableBegin, onBoundVariableEnd, onEnd, onOperandEnd, setStatus
-
-
-
-
Method Detail
-
onOperationBegin
public void onOperationBegin(NodeOperation expr)
Description copied from interface:ExprTreeVisitor
Starts visiting an operation node.- Specified by:
onOperationBegin
in interfaceExprTreeVisitor
- Overrides:
onOperationBegin
in classMapBasedPrinter.ExprTreeVisitor
- Parameters:
expr
- Operation node.
-
onOperationEnd
public void onOperationEnd(NodeOperation expr)
Description copied from interface:ExprTreeVisitor
Finishes visiting an operation node.- Specified by:
onOperationEnd
in interfaceExprTreeVisitor
- Overrides:
onOperationEnd
in classMapBasedPrinter.ExprTreeVisitor
- Parameters:
expr
- Operation node.
-
getOperandOrder
public int[] getOperandOrder()
Description copied from interface:ExprTreeVisitor
Returns an array of operand indexes that specify in which order the operands of the currently visited operator should be visited. If the order is standard (i.e. [0..N-1]),null
is returned.- Specified by:
getOperandOrder
in interfaceExprTreeVisitor
- Overrides:
getOperandOrder
in classMapBasedPrinter.ExprTreeVisitor
- Returns:
- Array of operand indexes or
null
for the standard order.
-
onOperandBegin
public void onOperandBegin(NodeOperation expr, Node operand, int index)
Description copied from interface:ExprTreeVisitor
Notifies that visiting an expression operand has started.- Specified by:
onOperandBegin
in interfaceExprTreeVisitor
- Overrides:
onOperandBegin
in classMapBasedPrinter.ExprTreeVisitor
- Parameters:
expr
- Operation node.operand
- Operand node.index
- Operand index.
-
-