public class JavaTemplateParser extends ProceduralTemplateParser
_includeFiles
_codeGenerator, _component, _parseTreeCodeGenerator
Constructor and Description |
---|
JavaTemplateParser()
Construct the JavaTemplateParser associated
with the given component and the given adapter.
|
Modifier and Type | Method and Description |
---|---|
protected JavaCodeGenerator |
_getCodeGenerator()
Get the code generator associated with this adapter class.
|
protected java.lang.String |
_replaceMacro(java.lang.String macro,
java.lang.String parameter)
Return the replacement string of the given macro.
|
java.lang.String |
getFunctionInvocation(java.lang.String functionString,
boolean isStatic)
Return the translated token instance function invocation string.
|
java.lang.String |
getNewInvocation(java.lang.String constructorString)
Return the translated new constructor invocation string.
|
ParseTreeCodeGenerator |
getParseTreeCodeGenerator()
Return a new parse tree code generator to use with expressions.
|
generateFireCode, getHeaderFiles, init
_findClosedParen, addFunctionUsed, addNewTypesUsed, escapeName, escapePortName, generateBlockCode, generateTypeConvertMethod, generateTypeConvertStatement, getCodeStream, getParameterValue, getPort, getSize, indexOf, parseList, processCode, setCodeGenerator, unescapeName, unescapePortName
public JavaTemplateParser()
public java.lang.String getFunctionInvocation(java.lang.String functionString, boolean isStatic) throws IllegalActionException
getFunctionInvocation
in class TemplateParser
functionString
- The string within the $tokenFunc() macro.isStatic
- True if the method is static.IllegalActionException
- The given function string is
not well-formed.public ParseTreeCodeGenerator getParseTreeCodeGenerator()
getParseTreeCodeGenerator
in class ProceduralTemplateParser
public java.lang.String getNewInvocation(java.lang.String constructorString) throws IllegalActionException
getNewInvocation
in class TemplateParser
constructorString
- The string within the $new() macro.IllegalActionException
- The given constructor string is
not well-formed.protected JavaCodeGenerator _getCodeGenerator()
_getCodeGenerator
in class TemplateParser
TemplateParser.setCodeGenerator(ProgramCodeGenerator)
protected java.lang.String _replaceMacro(java.lang.String macro, java.lang.String parameter) throws IllegalActionException
_replaceMacro
in class TemplateParser
macro
- The given macro.parameter
- The given parameter to the macro.IllegalActionException
- Thrown if the given macro or
parameter is not valid.