Class 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$
    Author:
    Rowland R Johnson
    Pt.AcceptedRating:
    Red (rowland)
    Pt.ProposedRating:
    Red (rowland)
    • Constructor Summary

      Constructors 
      Constructor Description
      EquationVisitor()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      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 UnitTerms.
      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
    • Constructor Detail

      • EquationVisitor

        public EquationVisitor()
    • Method Detail

      • _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 UnitTerms.
        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.