站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc 5.0.0

JPDADebugger (NetBeans Debugger JPDA API) - NetBeans API Javadoc 5.0.0

 

org.netbeans.api.debugger.jpda
Class JPDADebugger

java.lang.Object
  extended byorg.netbeans.api.debugger.jpda.JPDADebugger

public abstract class JPDADebugger
extends Object

Represents one JPDA debugger session (one VirtualMachine).

How to obtain it from DebuggerEngine:

    JPDADebugger jpdaDebugger = (JPDADebugger) debuggerEngine.lookup 
        (JPDADebugger.class);


Field Summary
static String ENGINE_ID
          ID of JPDA Debugger Engine.
static String PROP_CURRENT_CALL_STACK_FRAME
          Name of property for current stack frame.
static String PROP_CURRENT_THREAD
          Name of property for current thread.
static String PROP_STATE
          Name of property for state of debugger.
static String PROP_SUSPEND
          Property name constant.
static String SESSION_ID
          ID of JPDA Debugger Engine.
static int STATE_DISCONNECTED
          Debugger state constant.
static int STATE_RUNNING
          Debugger state constant.
static int STATE_STARTING
          Debugger state constant.
static int STATE_STOPPED
          Debugger state constant.
static int SUSPEND_ALL
          Suspend property value constant.
static int SUSPEND_EVENT_THREAD
          Suspend property value constant.
 
Constructor Summary
JPDADebugger()
           
 
Method Summary
abstract  void addPropertyChangeListener(PropertyChangeListener l)
          Adds property change listener.
abstract  void addPropertyChangeListener(String propertyName, PropertyChangeListener l)
          Adds property change listener.
static JPDADebugger attach(String hostName, int portNumber, Object[] services)
          This utility method helps to start a new JPDA debugger session.
static JPDADebugger attach(String name, Object[] services)
          This utility method helps to start a new JPDA debugger session.
 boolean canBeModified()
          Determines if the target debuggee can be modified.
abstract  boolean canFixClasses()
          Returns true if this debugger supports fix & continue (HotSwap).
abstract  boolean canPopFrames()
          Returns true if this debugger supports Pop action.
 JPDAStep createJPDAStep(int size, int depth)
          Creates a new JPDAStep.
abstract  Variable evaluate(String expression)
          Evaluates given expression in the current context.
protected  void fireBreakpointEvent(JPDABreakpoint breakpoint, JPDABreakpointEvent event)
          Helper method that fires JPDABreakpointEvent on JPDABreakpoints.
abstract  void fixClasses(Map classes)
          Implements fix & continue (HotSwap).
abstract  CallStackFrame getCurrentCallStackFrame()
          Returns current stack frame or null.
abstract  JPDAThread getCurrentThread()
          Returns current thread or null.
abstract  SmartSteppingFilter getSmartSteppingFilter()
          Returns instance of SmartSteppingFilter.
abstract  int getState()
          Returns current state of JPDA debugger.
abstract  int getSuspend()
          Gets value of suspend property.
static void launch(String mainClassName, String[] args, String classPath, boolean suspend)
          This utility method helps to start a new JPDA debugger session.
static JPDADebugger listen(com.sun.jdi.connect.ListeningConnector connector, Map args, Object[] services)
          This utility method helps to start a new JPDA debugger session.
abstract  void removePropertyChangeListener(PropertyChangeListener l)
          Removes property change listener.
abstract  void removePropertyChangeListener(String propertyName, PropertyChangeListener l)
          Removes property change listener.
abstract  void setSuspend(int s)
          Sets value of suspend property.
static void startListening(com.sun.jdi.connect.ListeningConnector connector, Map args, Object[] services)
          This utility method helps to start a new JPDA debugger session.
abstract  void waitRunning()
          Waits till the Virtual Machine is started and returns DebuggerStartException if some problem occurres.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROP_STATE

public static final String PROP_STATE
Name of property for state of debugger.

See Also:
Constant Field Values

PROP_CURRENT_THREAD

public static final String PROP_CURRENT_THREAD
Name of property for current thread.

See Also:
Constant Field Values

PROP_CURRENT_CALL_STACK_FRAME

public static final String PROP_CURRENT_CALL_STACK_FRAME
Name of property for current stack frame.

See Also:
Constant Field Values

PROP_SUSPEND

public static final String PROP_SUSPEND
Property name constant.

See Also:
Constant Field Values

SUSPEND_ALL

public static final int SUSPEND_ALL
Suspend property value constant.

See Also:
Constant Field Values

SUSPEND_EVENT_THREAD

public static final int SUSPEND_EVENT_THREAD
Suspend property value constant.

See Also:
Constant Field Values

STATE_STARTING

public static final int STATE_STARTING
Debugger state constant.

See Also:
Constant Field Values

STATE_RUNNING

public static final int STATE_RUNNING
Debugger state constant.

See Also:
Constant Field Values

STATE_STOPPED

public static final int STATE_STOPPED
Debugger state constant.

See Also:
Constant Field Values

STATE_DISCONNECTED

public static final int STATE_DISCONNECTED
Debugger state constant.

See Also:
Constant Field Values

ENGINE_ID

public static final String ENGINE_ID
ID of JPDA Debugger Engine.

See Also:
Constant Field Values

SESSION_ID

public static final String SESSION_ID
ID of JPDA Debugger Engine.

See Also:
Constant Field Values
Constructor Detail

JPDADebugger

public JPDADebugger()
Method Detail

launch

public static void launch(String mainClassName,
                          String[] args,
                          String classPath,
                          boolean suspend)
This utility method helps to start a new JPDA debugger session. Its implementation use LaunchingDICookie and DebuggerManager.getDebuggerManager().

Parameters:
mainClassName - a name or main class
args - command line arguments
classPath - a classPath
suspend - if true session will be suspended

listen

public static JPDADebugger listen(com.sun.jdi.connect.ListeningConnector connector,
                                  Map args,
                                  Object[] services)
                           throws DebuggerStartException
This utility method helps to start a new JPDA debugger session. Its implementation use ListeningDICookie and DebuggerManager.getDebuggerManager().

Parameters:
connector - The listening connector
args - The arguments
services - The additional services
Throws:
DebuggerStartException

startListening

public static void startListening(com.sun.jdi.connect.ListeningConnector connector,
                                  Map args,
                                  Object[] services)
                           throws DebuggerStartException
This utility method helps to start a new JPDA debugger session. Its implementation use ListeningDICookie and DebuggerManager.getDebuggerManager().

Parameters:
connector - The listening connector
args - The arguments
services - The additional services
Throws:
DebuggerStartException

attach

public static JPDADebugger attach(String hostName,
                                  int portNumber,
                                  Object[] services)
                           throws DebuggerStartException
This utility method helps to start a new JPDA debugger session. Its implementation use AttachingDICookie and DebuggerManager.getDebuggerManager().

Parameters:
hostName - a name of computer to attach to
portNumber - a port number
Throws:
DebuggerStartException

attach

public static JPDADebugger attach(String name,
                                  Object[] services)
                           throws DebuggerStartException
This utility method helps to start a new JPDA debugger session. Its implementation use AttachingDICookie and DebuggerManager.getDebuggerManager().

Parameters:
name - a name of shared memory block
Throws:
DebuggerStartException

getState

public abstract int getState()
Returns current state of JPDA debugger.

Returns:
current state of JPDA debugger
See Also:
STATE_STARTING, STATE_RUNNING, STATE_STOPPED, STATE_DISCONNECTED

getSuspend

public abstract int getSuspend()
Gets value of suspend property.

Returns:
value of suspend property

setSuspend

public abstract void setSuspend(int s)
Sets value of suspend property.

Parameters:
s - a new value of suspend property

getCurrentThread

public abstract JPDAThread getCurrentThread()
Returns current thread or null.

Returns:
current thread or null

getCurrentCallStackFrame

public abstract CallStackFrame getCurrentCallStackFrame()
Returns current stack frame or null.

Returns:
current stack frame or null

evaluate

public abstract Variable evaluate(String expression)
                           throws InvalidExpressionException
Evaluates given expression in the current context.

Parameters:
expression - a expression to be evaluated
Returns:
current value of given expression
Throws:
InvalidExpressionException

waitRunning

public abstract void waitRunning()
                          throws DebuggerStartException
Waits till the Virtual Machine is started and returns DebuggerStartException if some problem occurres.

Throws:
DebuggerStartException - is some problems occurres during debugger start
See Also:
AbstractDICookie.getVirtualMachine()

canFixClasses

public abstract boolean canFixClasses()
Returns true if this debugger supports fix & continue (HotSwap).

Returns:
true if this debugger supports fix & continue

canPopFrames

public abstract boolean canPopFrames()
Returns true if this debugger supports Pop action.

Returns:
true if this debugger supports Pop action

canBeModified

public boolean canBeModified()
Determines if the target debuggee can be modified.

Returns:
true if the target debuggee can be modified or when this information is not available (on JDK 1.4).
Since:
2.3

fixClasses

public abstract void fixClasses(Map classes)
Implements fix & continue (HotSwap). Map should contain class names as a keys, and byte[] arrays as a values.

Parameters:
classes - a map from class names to be fixed to byte[]

getSmartSteppingFilter

public abstract SmartSteppingFilter getSmartSteppingFilter()
Returns instance of SmartSteppingFilter.

Returns:
instance of SmartSteppingFilter

fireBreakpointEvent

protected void fireBreakpointEvent(JPDABreakpoint breakpoint,
                                   JPDABreakpointEvent event)
Helper method that fires JPDABreakpointEvent on JPDABreakpoints.

Parameters:
breakpoint - a breakpoint to be changed
event - a event to be fired

addPropertyChangeListener

public abstract void addPropertyChangeListener(PropertyChangeListener l)
Adds property change listener.

Parameters:
l - new listener.

removePropertyChangeListener

public abstract void removePropertyChangeListener(PropertyChangeListener l)
Removes property change listener.

Parameters:
l - removed listener.

addPropertyChangeListener

public abstract void addPropertyChangeListener(String propertyName,
                                               PropertyChangeListener l)
Adds property change listener.

Parameters:
propertyName - a name of property to listen on
l - new listener.

removePropertyChangeListener

public abstract void removePropertyChangeListener(String propertyName,
                                                  PropertyChangeListener l)
Removes property change listener.

Parameters:
propertyName - a name of property to listen on
l - removed listener.

createJPDAStep

public JPDAStep createJPDAStep(int size,
                               int depth)
Creates a new JPDAStep. Parameters correspond to JPDAStep constructor.

Returns:
JPDAStep
Throws:
{@link - java.lang.UnsupportedOperationException} If not overridden

 

Built on May 3 2007.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.