Class MVELDebugHandler

java.lang.Object
org.drools.mvel.expr.MVELDebugHandler

public final class MVELDebugHandler extends Object
Debug Handler for MVEL dialect. Takes care of registering breakpoints and calling required methods to trigger eclipse debugger to keep breakpoints in sync etc.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    protected static final org.slf4j.Logger
     
    static final boolean
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected static final void
     
    static boolean
    Returns current debug mode.
    Holds lazy initialized internal reference to improve performance.
    Therefore you can't change System property "mvel.debugger" after isDebugMode is called at least once.

    To update debug mode at runtime use setDebugMode(boolean)
    static void
    Notify remote debugger that runtime is ready to get latest breakpoint information
    protected static final void
    registerBreakpoint(String sourceName, int lineNumber)
     
    protected static final void
    removeBreakpoint(String sourceName, int lineNumber)
     
    static void
    setDebugMode(boolean b)
    Sets debug mode on/off.
    Updates local MVELDebugHandler property and System property "mvel.debugger"

    There's no need to ever call this method unless you write junit tests!
    protected static final void
    setOnBreakReturn(int value)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • logger

      protected static final transient org.slf4j.Logger logger
    • DEBUG_LAUNCH_KEY

      public static final String DEBUG_LAUNCH_KEY
      See Also:
    • verbose

      public static final boolean verbose
      See Also:
  • Constructor Details

    • MVELDebugHandler

      public MVELDebugHandler()
  • Method Details

    • receiveBreakpoints

      public static void receiveBreakpoints()
      Notify remote debugger that runtime is ready to get latest breakpoint information
    • registerBreakpoint

      protected static final void registerBreakpoint(String sourceName, int lineNumber)
    • clearAllBreakpoints

      protected static final void clearAllBreakpoints()
    • removeBreakpoint

      protected static final void removeBreakpoint(String sourceName, int lineNumber)
    • setOnBreakReturn

      protected static final void setOnBreakReturn(int value)
    • isDebugMode

      public static boolean isDebugMode()
      Returns current debug mode.
      Holds lazy initialized internal reference to improve performance.
      Therefore you can't change System property "mvel.debugger" after isDebugMode is called at least once.

      To update debug mode at runtime use setDebugMode(boolean)
      Returns:
      true if debug mode is enabled.
    • setDebugMode

      public static void setDebugMode(boolean b)
      Sets debug mode on/off.
      Updates local MVELDebugHandler property and System property "mvel.debugger"

      There's no need to ever call this method unless you write junit tests!
      Parameters:
      b - is Debug enabled?