Interface RuleIrVariablesGenerator

All Known Implementing Classes:
DefaultRuleIrVariablesGenerator

public interface RuleIrVariablesGenerator
Implementations of this interface are responsible for generating variables.
  • Field Details

  • Method Details

    • getRootContainer

      RuleIrVariablesContainer getRootContainer()
      Returns the root container.
      Returns:
      the root container
    • getCurrentContainer

      RuleIrVariablesContainer getCurrentContainer()
      Returns the current container.
      Returns:
      the current container
    • createContainer

      RuleIrVariablesContainer createContainer(String id)
      Creates a new container and uses the current one as parent. The new container is set as the current one.
      Parameters:
      id - - the id for the new container
      Returns:
      the current container
    • closeContainer

      void closeContainer()
      Closes the current container. The parent container is set as the current one.
    • generateVariable

      String generateVariable(Class<?> type)
      Generates a new variable for the given type. If a variable already exists for the given type in the current container or any of the parent containers, it will be used. If not, a new one will be created in the current container.
      Parameters:
      type - - the type
      Returns:
      the name of the variable
    • createLocalContainer

      RuleIrLocalVariablesContainer createLocalContainer()
      Creates a new local container.
      Returns:
      the current container
    • generateLocalVariable

      String generateLocalVariable(RuleIrLocalVariablesContainer container, Class<?> type)
      Generates a new variable for the given local container and type.
      Parameters:
      type - - the type
      Returns:
      the name of the variable