Class TBasicVM


  • public class TBasicVM
    extends Object
    The TBasicVM class executes Algorithm logic. Besides execution of operations list, the class provides logic to support GOTO to main method and errors processing.
    • Constructor Detail

    • Method Detail

      • run

        public Object run​(List<RuntimeOperation> methodSteps,
                          Map<String,​RuntimeOperation> methodLabels,
                          TBasicContextHolderEnv environment)
        Run sub-method of Algorithm. TBasicVM instance will execute the provided operations list.
        The sub-method can be called only within of execution of main Algorithm method. However, the implementation does not put any restrictions.
        Parameters:
        methodSteps - The list of operations to run.
        methodLabels - The labels register for sub-method.
        environment - The environment for execution.
        Returns:
        The result of the method execution.
      • run

        public Object run​(TBasicContextHolderEnv environment)
        Run the method of Algorithm. TBasicVM instance will run operations which are considered in current context.
        Method also implements logic to handle all errors by user defined handling method.
        Method should be called only for main Algorithm method, all sub methods should be run using run(List, Map, TBasicContextHolderEnv).
        Parameters:
        environment - The environment for execution.
        Returns:
        The result of the method execution.