|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectptolemy.kernel.util.NamedObj
ptolemy.kernel.util.Attribute
ptolemy.kernel.util.AbstractSettableAttribute
ptolemy.kernel.util.StringAttribute
ptolemy.actor.gt.GTIngredientsAttribute
public class GTIngredientsAttribute
An attribute that contains a list of GTIngredients and is associated with an entity in a transformation rule.
Red (tfeng) |
Yellow (tfeng) |
Nested Class Summary |
---|
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 GTIngredientList |
_ingredientList
The ingredient list obtained from the last expression parsing. |
private boolean |
_parsed
Indicate whether the current expression has been parsed. |
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 | |
---|---|
GTIngredientsAttribute()
Construct an attribute in the default workspace with an empty string as its name. |
|
GTIngredientsAttribute(NamedObj container,
java.lang.String name)
Construct an attribute with the given name contained by the specified container. |
|
GTIngredientsAttribute(Workspace workspace)
Construct an attribute in the specified workspace with an empty string as a name. |
Method Summary | |
---|---|
private void |
_init()
Initialize this attribute when the constructor is executed. |
private void |
_parse()
Parse the expression. |
GTIngredientList |
getIngredientList()
Parse the expression of this attribute if necessary and return the up-to-date ingredient list contained in this attribute. |
void |
setExpression(java.lang.String expression)
Set the expression of this attribute and defers parsing to the time when the ingredient list is obtained with getIngredientList() or
when validate() is invoked. |
java.util.Collection<?> |
validate()
Parse the expression if necessary. |
Methods inherited from class ptolemy.kernel.util.StringAttribute |
---|
_propagateValue, addValueListener, exportMoML, getExpression, getVisibility, removeValueListener, setVisibility |
Methods inherited from class ptolemy.kernel.util.AbstractSettableAttribute |
---|
getDefaultExpression, getValueAsString |
Methods inherited from class ptolemy.kernel.util.Attribute |
---|
_checkContainer, _getContainedObject, _propagateExistence, clone, getContainer, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, setContainer, setName, 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, setName |
Field Detail |
---|
private GTIngredientList _ingredientList
private boolean _parsed
Constructor Detail |
---|
public GTIngredientsAttribute()
public GTIngredientsAttribute(NamedObj container, java.lang.String name) throws IllegalActionException, NameDuplicationException
container
- The container.name
- The name of this attribute.
IllegalActionException
- If the attribute is not of an
acceptable class for the container, or if the name contains a period.
NameDuplicationException
- If the name coincides with
an attribute already in the container.public GTIngredientsAttribute(Workspace workspace)
workspace
- The workspace that will list the attribute.Method Detail |
---|
public GTIngredientList getIngredientList() throws MalformedStringException
MalformedStringException
- If error occurs while parsing the
expression.public void setExpression(java.lang.String expression) throws IllegalActionException
getIngredientList()
or
when validate()
is invoked.
setExpression
in interface Settable
setExpression
in class StringAttribute
expression
- The new expression.
IllegalActionException
- If thrown by the superclass.StringAttribute.getExpression()
public java.util.Collection<?> validate() throws IllegalActionException
validate
in interface Settable
validate
in class StringAttribute
IllegalActionException
- If error occurs while parsing the
expression.private void _init()
private void _parse() throws MalformedStringException
MalformedStringException
- If error occurs while parsing the
expression.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |