public class AppletWriter
extends soot.SceneTransformer
implements soot.HasPhaseOptions
The model is traversed and jar files are found for each
class. If a model uses other code by reference at runtime,
then if the model includes a parameter named "_jnlpClassesToJars",
then that parameter is expected to be an array of two element arrays,
where the first element is dot separated class name, and the
second element is the slash separated path to the jar file.
For example, {{"ptolemy.domains.sdf.kernel.SDFDirectory",
"ptolemy/domains/sdf/sdf.jar"}}
means that sdf.jar
should be included in the jar files.
Potential future enhancements
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDeclaredOptions()
Return the declared options.
|
java.lang.String |
getDefaultOptions()
Return the default options.
|
java.lang.String |
getPhaseName()
Return the phase name.
|
protected void |
internalTransform(java.lang.String phaseName,
java.util.Map options)
Save the model as an applet.
|
static AppletWriter |
v(CompositeEntity model)
Return an instance of this transformer that will operate on
the given model.
|
public static AppletWriter v(CompositeEntity model)
model
- The model that this class will operate on.public java.lang.String getDefaultOptions()
templateDirectory: ptolemy/copernicus/applet/
getDefaultOptions
in interface soot.HasPhaseOptions
public java.lang.String getDeclaredOptions()
modelPath outputDirectory ptIIJarsPath ptIILocalURL ptIIUserDirectory targetPackage targetPath templateDirectory
getDeclaredOptions
in interface soot.HasPhaseOptions
public java.lang.String getPhaseName()
getPhaseName
in interface soot.HasPhaseOptions
protected void internalTransform(java.lang.String phaseName, java.util.Map options)
For example, if the model is called MyModel, and this phase is called with:
-p wjtp.appletWriter targetPackage:foo.barThen we will create the directory $PTII/foo/bar/MyModel and place MyModel.xml, MyModel.htm, MyModelVergil.htm in that directory.
internalTransform
in class soot.SceneTransformer
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.