public class GroovyCodeFactory extends AbstractCodeFactory
ICodeFactory.Parameter| Modifier and Type | Field and Description |
|---|---|
static java.util.List<java.lang.String> |
RESERVED_KEYWORDS |
LINE_DELIMITERTRACE_MODULE_WRAPPER| Constructor and Description |
|---|
GroovyCodeFactory() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
classInstantiation(java.lang.Class<?> clazz,
java.lang.String[] parameters)
Create code to instantiate a java class.
|
java.lang.String |
createFunctionWrapper(IEnvironment environment,
java.lang.String moduleVariable,
java.lang.reflect.Method method)
Create code for a wrapper function in the global namespace of the script engine.
|
java.lang.String |
getSaveVariableName(java.lang.String variableName)
Converts a given string to a save variable name for the target language.
|
createCommentedString, createFunctionCall, createKeywordHeader, createWrapper, getDefaultValue, getMethodAliases, getMethodNames, getPostExecutionCode, getPreExecutionCodepublic java.lang.String classInstantiation(java.lang.Class<?> clazz,
java.lang.String[] parameters)
ICodeFactoryclazz - class to instantiateparameters - parameters used for class instantiationpublic java.lang.String getSaveVariableName(java.lang.String variableName)
ICodeFactoryvariableName - variable name candidatepublic java.lang.String createFunctionWrapper(IEnvironment environment, java.lang.String moduleVariable, java.lang.reflect.Method method)
AbstractCodeFactoryenvironment - environment instancemoduleVariable - function name to be usedmethod - method to refer to