Class ReloadAccessors


  • public class ReloadAccessors
    extends java.lang.Object
    Reload all the Acessors in a model and save the new updated model.
    Since:
    Ptolemy II 11.0
    Version:
    $Id$
    Author:
    Christopher Brooks
    Pt.AcceptedRating:
    Red (cxh)
    Pt.ProposedRating:
    Red (cxh)
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected static java.lang.reflect.Method _accessorReloader
      The org.terraswarm.accessor.JSAccessor.reloadAllAccesors(CompositeEntity) method.
    • Constructor Summary

      Constructors 
      Constructor Description
      ReloadAccessors()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void main​(java.lang.String[] args)
      Reload the accessors in the command line arguments and save the updated models.
      static void reloadAccessors​(java.lang.String modelFileName)
      Reload the accessors in a file and save the updated model.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • _accessorReloader

        protected static final java.lang.reflect.Method _accessorReloader
        The org.terraswarm.accessor.JSAccessor.reloadAllAccesors(CompositeEntity) method.
    • Constructor Detail

      • ReloadAccessors

        public ReloadAccessors()
    • Method Detail

      • main

        public static void main​(java.lang.String[] args)
        Reload the accessors in the command line arguments and save the updated models.

        To run this class, use $PTII/bin/ptinvoke, which sets the classpath properly:

          $PTII/bin/ptinvoke ptolemy.vergil.basic.imprt.accessor.ReloadAccessors $PTII/org/terraswarm/accessor/demo/Audio/Audio.xml
          

        To reload all the accessors, use $PTII/bin/reloadAllAccessors.

        Parameters:
        args - The file names of the Ptolemy models.
      • reloadAccessors

        public static void reloadAccessors​(java.lang.String modelFileName)
                                    throws java.lang.Throwable
        Reload the accessors in a file and save the updated model.
        Parameters:
        modelFileName - The file name of the model.
        Throws:
        java.lang.Throwable - If the model cannot be opened, accessors cannot be reloaded or the model saved.