ptolemy.moml.filter
Class LazyTypedCompositeActorChanges
java.lang.Object
ptolemy.moml.filter.LazyTypedCompositeActorChanges
- All Implemented Interfaces:
- MoMLFilter
public class LazyTypedCompositeActorChanges
- extends java.lang.Object
- implements MoMLFilter
When this class is registered with the MoMLParser.setMoMLFilter()
method, it will cause MoMLParser to filter so that all
the TypedCompositeActors except those within actor oriented class
definitios are changed to LazyTypedCompositeActors.
- Since:
- Ptolemy II 8.0
- Version:
- $Id: LazyTypedCompositeActorChanges.java 57044 2010-01-27 22:41:05Z cxh $
- Author:
- Christopher Hylands
- Accepted Rating:
- Proposed Rating:
Method Summary |
java.lang.String |
filterAttributeValue(NamedObj container,
java.lang.String element,
java.lang.String attributeName,
java.lang.String attributeValue,
java.lang.String xmlFile)
Possibly replaced TypedCompositeActors with LazyTypedCompositeActors. |
void |
filterEndElement(NamedObj container,
java.lang.String elementName,
java.lang.StringBuffer currentCharData,
java.lang.String xmlFile)
In this class, do nothing. |
java.lang.String |
toString()
Return a string that describes what the filter does. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
LazyTypedCompositeActorChanges
public LazyTypedCompositeActorChanges()
filterAttributeValue
public java.lang.String filterAttributeValue(NamedObj container,
java.lang.String element,
java.lang.String attributeName,
java.lang.String attributeValue,
java.lang.String xmlFile)
- Possibly replaced TypedCompositeActors with LazyTypedCompositeActors.
If the attributeName is "class", attributeValue is
"ptolemy.actor.TypedCompositeActor" and the container is
not withing an actor oriented class definition, then substitute
in the new class name "ptolemy.actor.LazyTypedCompositeActor".
- Specified by:
filterAttributeValue
in interface MoMLFilter
- Parameters:
container
- The container for this attribute.element
- The XML element name.attributeName
- The name of the attribute.attributeValue
- The value of the attribute.xmlFile
- The file currently being parsed.
- Returns:
- the value of the attributeValue argument.
filterEndElement
public void filterEndElement(NamedObj container,
java.lang.String elementName,
java.lang.StringBuffer currentCharData,
java.lang.String xmlFile)
throws java.lang.Exception
- In this class, do nothing.
- Specified by:
filterEndElement
in interface MoMLFilter
- Parameters:
container
- The object created by this element.elementName
- The element name.currentCharData
- The character data, which appears
only in the doc and configure elementsxmlFile
- The file currently being parsed.
- Throws:
java.lang.Exception
- Not thrown in this base class.
toString
public java.lang.String toString()
- Return a string that describes what the filter does.
- Specified by:
toString
in interface MoMLFilter
- Overrides:
toString
in class java.lang.Object
- Returns:
- the description of the filter that ends with a newline.