Package org.openl.rules.tbasic.runtime
Class TBasicVMDataContext
- java.lang.Object
-
- org.openl.rules.tbasic.runtime.TBasicVMDataContext
-
public class TBasicVMDataContext extends Object
TheTBasicVMDataContextcontains context for runningTBasicVM.
-
-
Constructor Summary
Constructors Constructor Description TBasicVMDataContext(List<RuntimeOperation> operations, Map<String,RuntimeOperation> labels, boolean isMainMethod)Create a new instance ofTBasicVMDataContext.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RuntimeOperationgetFirstOperation()Get the first operation in context to execute.RuntimeOperationgetLabeledOperation(String label)Get operation by its label.Map<String,RuntimeOperation>getLabels()Get labels register in context.RuntimeOperationgetNextOperation(RuntimeOperation operation)Get the next operation in context after the specified.List<RuntimeOperation>getOperations()Get operations in context.booleanisLabelInContext(String label)Is the label in the context.booleanisMainMethodContext()Get whether context is main method's one.
-
-
-
Constructor Detail
-
TBasicVMDataContext
public TBasicVMDataContext(List<RuntimeOperation> operations, Map<String,RuntimeOperation> labels, boolean isMainMethod)
Create a new instance ofTBasicVMDataContext.- Parameters:
operations-labels-isMainMethodContext-
-
-
Method Detail
-
getFirstOperation
public RuntimeOperation getFirstOperation()
Get the first operation in context to execute.- Returns:
- The first operation.
-
getLabeledOperation
public RuntimeOperation getLabeledOperation(String label)
Get operation by its label.- Parameters:
label- The label to look for.- Returns:
- The labeled operation.
-
getLabels
public Map<String,RuntimeOperation> getLabels()
Get labels register in context.- Returns:
- The labels register.
-
getNextOperation
public RuntimeOperation getNextOperation(RuntimeOperation operation)
Get the next operation in context after the specified.- Parameters:
operation- The current operation.- Returns:
- The next operation.
-
getOperations
public List<RuntimeOperation> getOperations()
Get operations in context.- Returns:
- The operations list.
-
isLabelInContext
public boolean isLabelInContext(String label)
Is the label in the context.- Parameters:
label- The label to look for.- Returns:
- Whether the label is in context.
-
isMainMethodContext
public boolean isMainMethodContext()
Get whether context is main method's one.- Returns:
- Whether context is main method's one.
-
-