ptolemy.codegen.java.kernel
Class JavaCodegenUtilities
java.lang.Object
ptolemy.codegen.java.kernel.JavaCodegenUtilities
public class JavaCodegenUtilities
- extends java.lang.Object
A utility class used to simplify creating c templates in EmbeddedCActors.
- Since:
- Ptolemy II 8.0
- Version:
- $Id: JavaCodegenUtilities.java 57044 2010-01-27 22:41:05Z cxh $
- Author:
- Teale Fristoe
- Accepted Rating:
- Proposed Rating:
Method Summary |
static java.lang.String |
getDefineBlock(java.lang.String constant,
java.lang.String value)
Return a code block to define a constant. |
static java.lang.String |
getIncludeBlock(java.lang.String file,
java.lang.String constant)
Return a code block to include a file. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JavaCodegenUtilities
public JavaCodegenUtilities()
getDefineBlock
public static java.lang.String getDefineBlock(java.lang.String constant,
java.lang.String value)
- Return a code block to define a constant.
- Parameters:
constant
- The name of the constant.value
- The value of the constant.
- Returns:
- A block of codegen code to define a constant.
getIncludeBlock
public static java.lang.String getIncludeBlock(java.lang.String file,
java.lang.String constant)
- Return a code block to include a file.
- Parameters:
file
- The name of the file.constant
- The name of the constant to check to see if the file
has already been included.
- Returns:
- A block of codegen code to include a file.