Class BackwardCompatibility


  • public class BackwardCompatibility
    extends java.lang.Object
    Return a list where each element is a backward compatibility filter to be applied by the MoMLParser.

    When this class is registered with

     MoMLParser.addMoMLFilters(BackwardCompatibility.allFilters())
     

    method, it will cause MoMLParser to filter so that models from earlier releases will run in the current release.

    Since:
    Ptolemy II 2.0
    Version:
    $Id$
    Author:
    Christopher Hylands, Edward A. Lee
    See Also:
    MoMLFilter
    Pt.AcceptedRating:
    Red (cxh)
    Pt.ProposedRating:
    Red (cxh)
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static void addFilter​(MoMLFilter filter)
      Add a MoMLFilter to the list of filters.
      static java.util.List allFilters()
      Return a shallow copy of the list where each element of the list is a MoMLFilter to be applied to handle backward compatibility.
      static void clear()
      Clear the list of filters.
      java.lang.String toString()
      Return a string that describes all the filters.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • BackwardCompatibility

        public BackwardCompatibility()
    • Method Detail

      • addFilter

        public static void addFilter​(MoMLFilter filter)
        Add a MoMLFilter to the list of filters.
        Parameters:
        filter - The filter to be added.
      • allFilters

        public static java.util.List allFilters()
        Return a shallow copy of the list where each element of the list is a MoMLFilter to be applied to handle backward compatibility.
        Returns:
        a list of all the filters.
      • clear

        public static void clear()
        Clear the list of filters.
      • toString

        public java.lang.String toString()
        Return a string that describes all the filters.
        Overrides:
        toString in class java.lang.Object
        Returns:
        the String that describes all the filters and that ends with a newline.