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_KEYWORDS
Fields inherited from class org.eclipse.ease.AbstractCodeFactory
LINE_DELIMITER
Fields 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 String
classInstantiation(Class<?> clazz, String[] parameters)
Create code to instantiate a java class.String
createFunctionWrapper(IEnvironment environment, String moduleVariable, Method method)
String
getSaveVariableName(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, createKeywordHeader, createWrapper, getDefaultValue, getMethodAliases, getMethodNames
-
Field Details
-
RESERVED_KEYWORDS
-
-
Constructor Details
-
GroovyCodeFactory
public GroovyCodeFactory()
-
-
Method Details
-
classInstantiation
Description copied from interface:ICodeFactory
Create 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:ICodeFactory
Converts 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)
-