Class GroovyCodeFactory

java.lang.Object
org.eclipse.ease.AbstractCodeFactory
org.eclipse.ease.lang.groovy.GroovyCodeFactory
All Implemented Interfaces:
ICodeFactory

public class GroovyCodeFactory extends AbstractCodeFactory
  • Field Details

    • RESERVED_KEYWORDS

      public static List<String> RESERVED_KEYWORDS
  • Constructor Details

    • GroovyCodeFactory

      public GroovyCodeFactory()
  • Method Details

    • classInstantiation

      public String classInstantiation(Class<?> clazz, String[] parameters)
      Description copied from interface: ICodeFactory
      Create code to instantiate a java class.
      Parameters:
      clazz - class to instantiate
      parameters - parameters used for class instantiation
      Returns:
      wrapped script code
    • getSaveVariableName

      public String getSaveVariableName(String variableName)
      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)