ptolemy.copernicus.applet
Class AppletWriter
java.lang.Object
soot.Transformer
soot.SceneTransformer
ptolemy.copernicus.applet.AppletWriter
- All Implemented Interfaces:
- soot.HasPhaseOptions
- public class AppletWriter
- extends soot.SceneTransformer
- implements soot.HasPhaseOptions
A transformer that writes an applet version of a model.
For a model called Foo, we generate Foo/makefile, Foo/Foo.xml,
Foo/Foo.htm Foo/FooVergil.htm in the directory named by the
outDir parameter.
Potential future enhancements
- Since:
- Ptolemy II 2.0
- Version:
- $Id: AppletWriter.java,v 1.62.2.1 2004/06/18 00:49:03 cxh Exp $
- Author:
- Christopher Hylands
- Accepted Rating:
- Proposed Rating:
| Methods inherited from class soot.SceneTransformer |
transform, transform |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
v
public static AppletWriter v(CompositeActor model)
- Return an instance of this transformer that will operate on
the given model. The model is assumed to already have been
properly initialized so that resolved types and other static
properties of the model can be inspected.
- Parameters:
model - The model that this class will operate on.
- Returns:
- An instance of the AppletWriter transformer.
getDefaultOptions
public java.lang.String getDefaultOptions()
- Specified by:
getDefaultOptions in interface soot.HasPhaseOptions
getDeclaredOptions
public java.lang.String getDeclaredOptions()
- Specified by:
getDeclaredOptions in interface soot.HasPhaseOptions
getPhaseName
public java.lang.String getPhaseName()
- Specified by:
getPhaseName in interface soot.HasPhaseOptions
internalTransform
protected void internalTransform(java.lang.String phaseName,
java.util.Map options)
- Save the model as an applet.
For example, if the model is called MyModel, and
this phase is called with:
-p wjtp.appletWriter targetPackage:foo.bar
Then we will create the directory $PTII/foo/bar/MyModel and
place MyModel.xml, MyModel.htm, MyModelVergil.htm in that
directory.
- Parameters:
phaseName - The name of the phase, for example
wjtp.appletWriter.options - The options Map. This method uses the
targetPackage option to specify package
to generate code in.