public class PythonCodeFactory extends AbstractCodeFactory
ICodeFactory.Parameter| Modifier and Type | Field and Description |
|---|---|
static List<String> |
RESERVED_KEYWORDS |
LINE_DELIMITERTRACE_MODULE_WRAPPER| Constructor and Description |
|---|
PythonCodeFactory() |
| Modifier and Type | Method and Description |
|---|---|
String |
classInstantiation(Class<?> clazz,
String[] parameters)
Create code to instantiate a java class.
|
String |
createFinalFieldWrapper(IEnvironment environment,
String moduleVariable,
Field field)
Create code to bind a final java field to a script variable.
|
String |
createFunctionWrapper(IEnvironment environment,
String moduleVariable,
Method method)
Create code to wrap a java method call on a given script variable to the target language.
|
String |
getSaveVariableName(String variableName)
Converts a given string to a save variable name for the target language.
|
boolean |
isValidMethodName(String methodName) |
createCommentedString, createCommentedString, createFunctionCall, createKeywordHeader, getDefaultValue, getMethodNames, getPostExecutionCode, getPreExecutionCodepublic String createFunctionWrapper(IEnvironment environment, String moduleVariable, Method method)
ICodeFactoryenvironment - script environmentmoduleVariable - name of variable holding the module instancemethod - method to be wrappedpublic String getSaveVariableName(String variableName)
ICodeFactoryvariableName - variable name candidatepublic String classInstantiation(Class<?> clazz, String[] parameters)
ICodeFactoryclazz - class to instantiateparameters - parameters used for class instantiationpublic boolean isValidMethodName(String methodName)
public String createFinalFieldWrapper(IEnvironment environment, String moduleVariable, Field field)
ICodeFactoryenvironment - script environmentmoduleVariable - name of variable holding the module instancefield - field to be accessed