Package org.eclipse.ease.lang.groovy
Class GroovyCodeFactory
java.lang.Object
org.eclipse.ease.AbstractCodeFactory
org.eclipse.ease.lang.groovy.GroovyCodeFactory
- All Implemented Interfaces:
ICodeFactory
public class GroovyCodeFactory extends AbstractCodeFactory
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.ease.ICodeFactory
ICodeFactory.Parameter -
Field Summary
Fields Modifier and Type Field Description static List<String>RESERVED_KEYWORDSFields inherited from class org.eclipse.ease.AbstractCodeFactory
LINE_DELIMITERFields inherited from interface org.eclipse.ease.ICodeFactory
RESULT_NAME, TRACE_MODULE_WRAPPER -
Constructor Summary
Constructors Constructor Description GroovyCodeFactory() -
Method Summary
Modifier and Type Method Description StringclassInstantiation(Class<?> clazz, String[] parameters)Create code to instantiate a java class.StringcreateFunctionWrapper(IEnvironment environment, String moduleVariable, Method method)StringgetSaveVariableName(String variableName)Converts a given string to a save variable name for the target language.Methods inherited from class org.eclipse.ease.AbstractCodeFactory
createCommentedString, createFunctionCall, createWrapper, getDefaultValue, getMethodAliases, getMethodNames
-
Field Details
-
RESERVED_KEYWORDS
-
-
Constructor Details
-
GroovyCodeFactory
public GroovyCodeFactory()
-
-
Method Details
-
classInstantiation
Description copied from interface:ICodeFactoryCreate code to instantiate a java class.- Parameters:
clazz- class to instantiateparameters- parameters used for class instantiation- Returns:
- wrapped script code
-
getSaveVariableName
Description copied from interface:ICodeFactoryConverts a given string to a save variable name for the target language. Typically filters invalid characters and verifies that the returned string does not match any reserved keyword. Does not verify if the returned name is already in use.- Parameters:
variableName- variable name candidate- Returns:
- converted variable name
-
createFunctionWrapper
public String createFunctionWrapper(IEnvironment environment, String moduleVariable, Method method)
-