Package org.eclipse.ease.lang.ruby
Class RubyCodeFactory
java.lang.Object
org.eclipse.ease.AbstractCodeFactory
org.eclipse.ease.lang.ruby.RubyCodeFactory
- All Implemented Interfaces:
ICodeFactory
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.ease.ICodeFactory
ICodeFactory.Parameter
-
Field Summary
FieldsFields 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 -
Method Summary
Modifier and TypeMethodDescriptionclassInstantiation
(Class<?> clazz, String[] parameters) Create code to instantiate a java class.createFunctionWrapper
(IEnvironment environment, String moduleVariable, Method method) 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, createWrapper, getDefaultValue, getMethodAliases, getMethodNames
-
Field Details
-
RESERVED_KEYWORDS
-
-
Constructor Details
-
RubyCodeFactory
public RubyCodeFactory()
-
-
Method Details
-
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
-
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
-