|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectptolemy.kernel.util.NamedObj
ptolemy.kernel.util.Attribute
ptolemy.kernel.util.AbstractSettableAttribute
ptolemy.data.expr.Variable
ptolemy.data.expr.Parameter
ptolemy.actor.gt.controller.ModelParameter
public class ModelParameter
A parameter in the Ptera-based model transformation that temporarily stores the model to be transformed.
| Red (tfeng) |
| Yellow (tfeng) |
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class ptolemy.data.expr.Variable |
|---|
Variable.VariableScope |
| Nested classes/interfaces inherited from class ptolemy.kernel.util.NamedObj |
|---|
NamedObj.ContainedObjectsIterator |
| Nested classes/interfaces inherited from interface ptolemy.kernel.util.Settable |
|---|
Settable.Visibility |
| Field Summary | |
|---|---|
private java.util.List<Initializable> |
_initializables
List of objects whose (pre)initialize() and wrapup() methods should be slaved to these. |
private CompositeEntity |
_model
The model in this parameter. |
private ActorToken |
_token
The most recently created ActorToken. |
private long |
_tokenVersion
The version of the ActorToken. |
| Fields inherited from class ptolemy.data.expr.Variable |
|---|
_currentExpression, _needsEvaluation, _parserScope, _parseTreeValid, _valueListeners |
| Fields inherited from class ptolemy.kernel.util.NamedObj |
|---|
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS |
| Fields inherited from interface ptolemy.kernel.util.Settable |
|---|
EXPERT, FULL, NONE, NOT_EDITABLE |
| Constructor Summary | |
|---|---|
ModelParameter(NamedObj container,
java.lang.String name)
Construct a parameter with the given name contained by the specified entity. |
|
| Method Summary | |
|---|---|
void |
addInitializable(Initializable initializable)
Add the specified object to the list of objects whose preinitialize(), initialize(), and wrapup() methods should be invoked upon invocation of the corresponding methods of this object. |
java.lang.Object |
clone(Workspace workspace)
Clone the parameter. |
void |
exportMoML(java.io.Writer output,
int depth,
java.lang.String name)
Write a MoML description of this parameter, unless this parameter is not persistent. |
java.lang.String |
getExpression()
Return an empty string. |
CompositeEntity |
getModel()
Get the model stored in this parameter. |
Token |
getToken()
Get the token of this parameter, which is an ActorToken
containing the model. |
void |
initialize()
Initialize this model parameter. |
void |
modelChanged()
React to change of the model in this parameter. |
void |
preinitialize()
Preinitialize this model parameter and set the current model to be null. |
void |
removeInitializable(Initializable initializable)
Remove the specified object from the list of objects whose preinitialize(), initialize(), and wrapup() methods should be invoked upon invocation of the corresponding methods of this object. |
void |
setContainer(NamedObj container)
Set the new container of this parameter. |
void |
setExpression(java.lang.String expression)
Do nothing. |
void |
setModel(CompositeEntity model)
Set the model in this parameter. |
void |
setToken(Token token)
Set the model in this parameter with an ActorToken. |
void |
wrapup()
Set the model in this parameter to be null. |
| Methods inherited from class ptolemy.data.expr.Parameter |
|---|
addChoice, getChoices, removeAllChoices, removeChoice |
| Methods inherited from class ptolemy.kernel.util.AbstractSettableAttribute |
|---|
getDefaultExpression |
| Methods inherited from class ptolemy.kernel.util.Attribute |
|---|
_checkContainer, _getContainedObject, _propagateExistence, getContainer, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, updateContent |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface ptolemy.kernel.util.Settable |
|---|
getDisplayName |
| Methods inherited from interface ptolemy.kernel.util.Nameable |
|---|
description, getContainer, getFullName, getName, getName |
| Field Detail |
|---|
private transient java.util.List<Initializable> _initializables
private CompositeEntity _model
private ActorToken _token
private long _tokenVersion
| Constructor Detail |
|---|
public ModelParameter(NamedObj container,
java.lang.String name)
throws IllegalActionException,
NameDuplicationException
container - The container.name - The name of the parameter.
IllegalActionException - If the parameter is not of an
acceptable class for the container.
NameDuplicationException - If the name coincides with
a parameter already in the container.| Method Detail |
|---|
public void addInitializable(Initializable initializable)
addInitializable in interface Initializableinitializable - The object whose methods should be invoked.removeInitializable(Initializable)
public java.lang.Object clone(Workspace workspace)
throws java.lang.CloneNotSupportedException
clone in class Variableworkspace - The workspace in which to place the cloned variable.
java.lang.CloneNotSupportedException - Not thrown in this base class.Object.clone()
public void exportMoML(java.io.Writer output,
int depth,
java.lang.String name)
throws java.io.IOException
exportMoML in interface MoMLExportableexportMoML in class Parameteroutput - The output stream to write to.depth - The depth in the hierarchy, to determine indenting.name - The name to use instead of the current name.
java.io.IOException - If an I/O error occurs.NamedObj.isPersistent()public java.lang.String getExpression()
getExpression in interface SettablegetExpression in class VariablesetExpression(String)public CompositeEntity getModel()
setModel(CompositeEntity)
public Token getToken()
throws IllegalActionException
ActorToken
containing the model.
getToken in class VariableIllegalActionException - If the ActorToken cannot be created.setToken(Token)
public void initialize()
throws IllegalActionException
initialize in interface InitializableIllegalActionException - If thrown by other initializables
associated to this parameter.public void modelChanged()
public void preinitialize()
throws IllegalActionException
preinitialize in interface InitializableIllegalActionException - If thrown by other initializables
associated to this parameter.public void removeInitializable(Initializable initializable)
removeInitializable in interface Initializableinitializable - The object whose methods should no longer be invoked.addInitializable(Initializable)
public void setContainer(NamedObj container)
throws IllegalActionException,
NameDuplicationException
setContainer in class Variablecontainer - The new container.
IllegalActionException - If the container will not accept
a variable as its attribute, or this variable and the container
are not in the same workspace, or the proposed container would
result in recursive containment.
NameDuplicationException - If the container already has
an attribute with the name of this variable.Attribute.getContainer()public void setExpression(java.lang.String expression)
setExpression in interface SettablesetExpression in class Variableexpression - The new expression.getExpression()public void setModel(CompositeEntity model)
model - The new model.getModel()
public void setToken(Token token)
throws IllegalActionException
ActorToken.
setToken in class Variabletoken - The ActorToken.
IllegalActionException - If the token is not an ActorToken.getToken()
public void wrapup()
throws IllegalActionException
wrapup in interface InitializableIllegalActionException - If thrown by other initializables
associated to this parameter.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||