ptolemy.moml.unit
Class EquationVisitor
java.lang.Object
ptolemy.moml.unit.EquationVisitor
- Direct Known Subclasses:
- ExpandPortNames
public abstract class EquationVisitor
- extends java.lang.Object
An Abstract class that specifies all the necessary aspects of visitors to a
UnitEquation.
The generic version of the method to visit a UnitEquation,
UnitExpr, and UnitTerm are specified here. To do a specific kind of
visit create a class that extends EquationVisitor that overrides
some one or more of these methods. These methods are specified as
throwing an IllegalActionException to make it possible for the
overridden methods in a subclass to throw IllegalActionException.
- Since:
- Ptolemy II 8.0
- Version:
- $Id: EquationVisitor.java 57044 2010-01-27 22:41:05Z cxh $
- Author:
- Rowland R Johnson
- Accepted Rating:
- Proposed Rating:
Method Summary |
protected java.lang.Object |
_visitUnitEquation(UnitEquation uEquation)
Visit a UnitEquation by visiting the left and right sides of the
equation. |
protected java.lang.Object |
_visitUnitExpr(UnitExpr unitExpr)
Visit a UnitExpr by visiting the UnitRerms. |
protected java.lang.Object |
_visitUnitTerm(UnitTerm uTerm)
Visit a UnitTerm by visiting the UnitExpr if there is one. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EquationVisitor
public EquationVisitor()
_visitUnitEquation
protected java.lang.Object _visitUnitEquation(UnitEquation uEquation)
throws IllegalActionException
- Visit a UnitEquation by visiting the left and right sides of the
equation.
- Parameters:
uEquation
- The UnitEquation to visit.
- Returns:
- Null, can be overridden in a concrete visitor.
- Throws:
IllegalActionException
- Not thrown in this base class.
_visitUnitExpr
protected java.lang.Object _visitUnitExpr(UnitExpr unitExpr)
throws IllegalActionException
- Visit a UnitExpr by visiting the UnitRerms.
- Parameters:
unitExpr
- The UnitExpr to visit.
- Returns:
- Null, can be overridden in a concrete visitor.
- Throws:
IllegalActionException
- Not thrown in this base class.
_visitUnitTerm
protected java.lang.Object _visitUnitTerm(UnitTerm uTerm)
throws IllegalActionException
- Visit a UnitTerm by visiting the UnitExpr if there is one. This method
will almost certainly be overridden in a subclass.
- Parameters:
uTerm
- The UnitTerm to visit.
- Returns:
- Null, can be overridden in a concrete visitor.
- Throws:
IllegalActionException
- Not thrown in this base class.