ptolemy.data.expr
Class MoMLUtilities

java.lang.Object
  extended by ptolemy.data.expr.MoMLUtilities

public class MoMLUtilities
extends java.lang.Object

This class provides access to the Ptolemy MoML parser in ptolemy.moml by using reflection.

Since:
Ptolemy II 8.0
Version:
$Id: MoMLUtilities.java 57046 2010-01-27 23:35:53Z cxh $
Author:
Christopher Brooks. Based on ParseMoML by Edward A. Lee. Based on MatlabUtilities by Steve Neuendorffer and Zoltan Kemenczy (Research in Motion Ltd.)
See Also:
ParseTreeEvaluator
Accepted Rating:
Red (cxh)
Proposed Rating:
Red (cxh)

Field Summary
private static java.lang.Class _parserClass
           
private static java.lang.reflect.Method _parserParse
           
private static java.lang.reflect.Method _parserResetAll
           
 
Constructor Summary
MoMLUtilities()
           
 
Method Summary
private static void _initialize()
           
static ActorToken parseMoML(java.lang.String moml)
          Parse the string provided and return the result wrapped in a token.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_parserClass

private static java.lang.Class _parserClass

_parserParse

private static java.lang.reflect.Method _parserParse

_parserResetAll

private static java.lang.reflect.Method _parserResetAll
Constructor Detail

MoMLUtilities

public MoMLUtilities()
Method Detail

parseMoML

public static ActorToken parseMoML(java.lang.String moml)
                            throws java.lang.Exception
Parse the string provided and return the result wrapped in a token.

Parameters:
moml - The MoML string.
Returns:
The result of parsing the MoML.
Throws:
java.lang.Exception - If the MoML is invalid or the results is not an instance of Entity.

_initialize

private static void _initialize()
                         throws IllegalActionException
Throws:
IllegalActionException