org.drools.base.mvel
Class MVELDebugHandler

java.lang.Object
  extended by org.drools.base.mvel.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
static String DEBUG_LAUNCH_KEY
           
static boolean verbose
           
 
Constructor Summary
MVELDebugHandler()
           
 
Method Summary
protected static void clearAllBreakpoints()
           
static boolean isDebugMode()
          Returns current debug mode.
static void receiveBreakpoints()
          Notify remote debugger that runtime is ready to get latest breakpoint information
protected static void registerBreakpoint(String sourceName, int lineNumber)
           
protected static void removeBreakpoint(String sourceName, int lineNumber)
           
static void setDebugMode(boolean b)
          Sets debug mode on/off.
protected static void setOnBreakReturn(int value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEBUG_LAUNCH_KEY

public static final String DEBUG_LAUNCH_KEY
See Also:
Constant Field Values

verbose

public static final boolean verbose
See Also:
Constant Field Values
Constructor Detail

MVELDebugHandler

public MVELDebugHandler()
Method Detail

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?


Copyright © 2001-2012 JBoss by Red Hat. All Rights Reserved.