Class TBasicVMDataContext


  • public class TBasicVMDataContext
    extends Object
    The TBasicVMDataContext contains context for running TBasicVM.
    • Constructor Detail

      • TBasicVMDataContext

        public TBasicVMDataContext​(List<RuntimeOperation> operations,
                                   Map<String,​RuntimeOperation> labels,
                                   boolean isMainMethod)
        Create a new instance of TBasicVMDataContext.
        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.