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

DebuggerEngine (NetBeans Debugger Core API) - NetBeans API Javadoc 4.1.0

 

org.netbeans.api.debugger
Class DebuggerEngine

java.lang.Object
  extended byorg.netbeans.api.debugger.DebuggerEngine

public final class DebuggerEngine
extends Object

Debugger Engine represents implementation of one debugger (Java Debugger, CPP Debugger). It can support debugging of one or more Sessions, in one or more languages. It provides root of threads hierarchy (call stacks, locals) and manages debugger actions.


Description
Functionality Support for actions: DebuggerEngine manages list of actions (getActionsManager()). Debugger action (implemented by ActionsProvider) can be registerred to DebuggerEngine during a start of debugger. See ActionsProvider. DebuggerEngine can be used to call some debugger action (ActionsManager.doAction(java.lang.Object)) and to distinguish availability of action (ActionsManager.isEnabled(java.lang.Object)). Example how to call Kill Action on this engine:
    engine.getActionsManager ().doAction (DebuggerEngine.ACTION_KILL);

Support for aditional services: DebuggerEngine is final class. That is why the standard method how to extend its functionality is using lookup methods (lookup(java.lang.String, java.lang.Class) and lookupFirst(java.lang.String, java.lang.Class)). There are two ways how to register some service provider for some type of DebuggerEngine:
  • Register 'live' instance of service provider during creation of new instance of DebuggerEngine (see method DebuggerEngineProvider.getServices()).
  • Register service provider in Manifest-inf/debugger/{#getTypeID} folder. See Debugger SPI for more information about registration.

Support for listening: DebuggerEngine propagates all changes to two type of listeners - general PropertyChangeListener and specific DebuggerEngineListener.
Clinents / Providers This class is final, so it does not have any external provider. Debugger Plug-ins and UI modules are clients of this class.
Lifecycle A new instance(s) of DebuggerEngine class are created in Debugger Core module only, during the process of starting of debugging (see DebuggerManager.startDebugging(org.netbeans.api.debugger.DebuggerInfo). DebuggerEngine is removed automatically from DebuggerManager when the the last action is (#ACTION_KILL).
Evolution No method should be removed from this class, but some functionality can be added in future.


Nested Class Summary
 class DebuggerEngine.Destructor
          This class notifies about DebuggerEngine remove from the system, and about changes in language support.
 
Method Summary
 ActionsManager getActionsManager()
           
 List lookup(String folder, Class service)
          Returns list of services of given type from given folder.
 Object lookupFirst(String folder, Class service)
          Returns one service of given type from given folder.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

lookup

public List lookup(String folder,
                   Class service)
Returns list of services of given type from given folder.

Parameters:
service - a type of service to look for
Returns:
list of services of given type

lookupFirst

public Object lookupFirst(String folder,
                          Class service)
Returns one service of given type from given folder.

Parameters:
service - a type of service to look for
Returns:
ne service of given type

getActionsManager

public ActionsManager getActionsManager()

 

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