类 DSLRuntime

java.lang.Object
com.tlcsdm.core.dsl.runtime.DSLRuntime

public class DSLRuntime extends Object
The DSLRuntime parses and executes Strings based on the supplied DSL.
从以下版本开始:
Jan, 17th, 2017
作者:
Konloch
  • 字段详细资料

  • 构造器详细资料

    • DSLRuntime

      public DSLRuntime(DSL dsl)
      Construct a new instance of the DSLRuntime
      参数:
      dsl - any DSL
  • 方法详细资料

    • stopParse

      public void stopParse()
      Signal to the runtime that the parsing has stopped externally.
    • parseLine

      public void parseLine(String line)
      Attempts to parse any String and runs it if it's part of the init, or else it will store the DLSRuntimeCommand under the read subscript
      参数:
      line - any String
    • execute

      public void execute(DSLRuntimeCommand runtimeCommand)
      Executes a specific DLSRuntimeCommand
      参数:
      runtimeCommand - any DLSRuntimeCommand
    • buildRuntimeCommand

      public DSLRuntimeCommand buildRuntimeCommand(String line)
      Attempts to build a DSLRuntimeCommand from any String.
      参数:
      line - any String
      返回:
      the DSLRuntimeCommand if it can be created, if not it will return null
    • getCommands

      public HashMap<String,DSLRuntimeCommand> getCommands()
      Returns all the DLSRuntimeCommands created during runtime.
      返回:
      the commands in the form of a HashMap
    • getDSL

      public DSL getDSL()
      Returns the DSL linked with this DSLRuntime instance.
      返回:
      the DSL instance