kd.bos.script.jsengine.debug

## 类 DIM

- java.lang.Object
- - kd.bos.script.jsengine.debug.DIM

-     public class DIM
      extends java.lang.Object

  Dim or Debugger Implementation for Rhino.

- - ### 嵌套类概要

    嵌套类
    限定符和类型 | 类和说明
    --- | ---
    `static class` | `DIM.ContextData` Class to store information about a stack.
    `static class` | `DIM.FunctionSource` Class to store information about a function.
    `static class` | `DIM.SourceInfo` Class to store information about a script source.
    `static class` | `DIM.StackFrame` Object to represent one stack frame.

  - ### 字段概要

    字段
    限定符和类型 | 字段和说明
    --- | ---
    `static int` | `BREAK`
    `static int` | `EXIT`
    `static int` | `GO`
    `static int` | `RESUME`
    `static int` | `STEP_INTO`
    `static int` | `STEP_OUT`
    `static int` | `STEP_OVER`

  - ### 构造器概要

    构造器
    构造器和说明
    `DIM(java.util.concurrent.atomic.AtomicBoolean skipAllBreakpoints)`

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `void` | `attachTo(org.mozilla.javascript.ContextFactory factory)` Attaches the debugger to the given ContextFactory.
    `void` | `clearAllBreakpoints()` Clears all breakpoints.
    `void` | `compileScript(java.lang.String url, java.lang.String text)` Compiles the given script.
    `void` | `contextSwitch(int frameIndex)` Switches context to the stack frame with the given index.
    `DIM.ContextData` | `currentContextData()` Returns the current ContextData object.
    `void` | `detach()` Detaches the debugger from the current ContextFactory.
    `void` | `dispose()` Releases resources associated with this debugger.
    `java.lang.Object` | `eval(java.lang.String expr)`
    `java.lang.Object` | `eval(java.lang.String expr, boolean forWatch)` Evaluates the given script.
    `void` | `evalScript(java.lang.String url, java.lang.String text)` Evaluates the given script.
    `java.lang.String[]` | `functionNames()` Returns an array of all function names.
    `DIM.FunctionSource` | `functionSourceByName(java.lang.String functionName)` Returns the FunctionSource object for the function with the given name.
    `java.lang.Object[]` | `getObjectIds(java.lang.Object object)` Returns an array of the property names on the given script object.
    `java.lang.Object` | `getObjectProperty(java.lang.Object object, java.lang.Object id)` Returns the value of a property on the given script object.
    `void` | `go()` Resumes execution of script.
    `java.lang.String` | `objectToString(java.lang.Object object)` Converts the given script object to a string.
    `void` | `setBreak()` Tells the debugger to break at the next opportunity.
    `void` | `setBreakOnEnter(boolean breakOnEnter)` Sets whether the debugger should break on function entering.
    `void` | `setBreakOnExceptions(boolean breakOnExceptions)` Sets whether the debugger should break on exceptions.
    `void` | `setBreakOnReturn(boolean breakOnReturn)` Sets whether the debugger should break on function return.
    `void` | `setGuiCallback(GuiCallback callback)` Sets the GuiCallback object to use.
    `void` | `setReturnValue(int returnValue)` Sets the action to perform to end interruption.
    `void` | `setScopeProvider(KScopeProvider scopeProvider)` Sets the ScopeProvider to be used.
    `void` | `setSourceProvider(KSourceProvider sourceProvider)` Sets the ScopeProvider to be used.
    `DIM.SourceInfo` | `sourceInfo(java.lang.String url)` Returns the SourceInfo object for the given URL.
    `boolean` | `stringIsCompilableUnit(java.lang.String str)` Returns whether the given string is syntactically valid script.

    - ### 从类继承的方法 java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 字段详细资料

    - #### STEP_OVER

          public static final int STEP_OVER

      另请参阅:
        常量字段值

    - #### STEP_INTO

          public static final int STEP_INTO

      另请参阅:
        常量字段值

    - #### STEP_OUT

          public static final int STEP_OUT

      另请参阅:
        常量字段值

    - #### GO

          public static final int GO

      另请参阅:
        常量字段值

    - #### RESUME

          public static final int RESUME

      另请参阅:
        常量字段值

    - #### BREAK

          public static final int BREAK

      另请参阅:
        常量字段值

    - #### EXIT

          public static final int EXIT

      另请参阅:
        常量字段值

  - ### 构造器详细资料

    - #### DIM

          public DIM(java.util.concurrent.atomic.AtomicBoolean skipAllBreakpoints)

  - ### 方法详细资料

    - #### setGuiCallback

          public void setGuiCallback(GuiCallback callback)

      Sets the GuiCallback object to use.

    - #### setBreak

          public void setBreak()

      Tells the debugger to break at the next opportunity.

    - #### setScopeProvider

          public void setScopeProvider(KScopeProvider scopeProvider)

      Sets the ScopeProvider to be used.

    - #### setSourceProvider

          public void setSourceProvider(KSourceProvider sourceProvider)

      Sets the ScopeProvider to be used.

    - #### contextSwitch

          public void contextSwitch(int frameIndex)

      Switches context to the stack frame with the given index.

    - #### setBreakOnExceptions

          public void setBreakOnExceptions(boolean breakOnExceptions)

      Sets whether the debugger should break on exceptions.

    - #### setBreakOnEnter

          public void setBreakOnEnter(boolean breakOnEnter)

      Sets whether the debugger should break on function entering.

    - #### setBreakOnReturn

          public void setBreakOnReturn(boolean breakOnReturn)

      Sets whether the debugger should break on function return.

    - #### attachTo

          public void attachTo(org.mozilla.javascript.ContextFactory factory)

      Attaches the debugger to the given ContextFactory.

    - #### detach

          public void detach()

      Detaches the debugger from the current ContextFactory.

    - #### dispose

          public void dispose()

      Releases resources associated with this debugger.

    - #### functionNames

          public java.lang.String[] functionNames()

      Returns an array of all function names.

    - #### functionSourceByName

          public DIM.FunctionSource functionSourceByName(java.lang.String functionName)

      Returns the FunctionSource object for the function with the given name.

    - #### sourceInfo

          public DIM.SourceInfo sourceInfo(java.lang.String url)

      Returns the SourceInfo object for the given URL.

    - #### clearAllBreakpoints

          public void clearAllBreakpoints()

      Clears all breakpoints.

    - #### currentContextData

          public DIM.ContextData currentContextData()

      Returns the current ContextData object.

    - #### setReturnValue

          public void setReturnValue(int returnValue)

      Sets the action to perform to end interruption.

    - #### go

          public void go()

      Resumes execution of script.

    - #### eval

          public java.lang.Object eval(java.lang.String expr)

    - #### eval

          public java.lang.Object eval(java.lang.String expr,
                                       boolean forWatch)

      Evaluates the given script.

    - #### compileScript

          public void compileScript(java.lang.String url,
                                    java.lang.String text)

      Compiles the given script.

    - #### evalScript

          public void evalScript(java.lang.String url,
                                 java.lang.String text)

      Evaluates the given script.

    - #### objectToString

          public java.lang.String objectToString(java.lang.Object object)

      Converts the given script object to a string.

    - #### stringIsCompilableUnit

          public boolean stringIsCompilableUnit(java.lang.String str)

      Returns whether the given string is syntactically valid script.

    - #### getObjectProperty

          public java.lang.Object getObjectProperty(java.lang.Object object,
                                                    java.lang.Object id)

      Returns the value of a property on the given script object.

    - #### getObjectIds

          public java.lang.Object[] getObjectIds(java.lang.Object object)

      Returns an array of the property names on the given script object.