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

LaunchingDICookie (NetBeans Debugger JPDA API) - NetBeans API Javadoc 4.1.0

 

org.netbeans.api.debugger.jpda
Class LaunchingDICookie

java.lang.Object
  extended byorg.netbeans.api.debugger.jpda.AbstractDICookie
      extended byorg.netbeans.api.debugger.jpda.LaunchingDICookie

public final class LaunchingDICookie
extends AbstractDICookie

Launches a new JVM in debug mode and returns VirtualMachine for it.

How to use it:

    DebuggerInfo di = DebuggerInfo.create (
        "My First Launching Debugger Info", 
        new Object [] {
            LaunchingDICookie.create (
                "examples.texteditor.Ted",
                new String [] {},
                "c:\\nb\\settings\\sampledir",
                true
            )
        }
    );
    DebuggerManager.getDebuggerManager ().startDebugging (di);


Field Summary
static String ID
          Public ID used for registration in Meta-inf/debugger.
 
Method Summary
static LaunchingDICookie create(String mainClassName, String[] args, String classPath, boolean suspend)
          Creates a new instance of LaunchingDICookie for given parameters.
static LaunchingDICookie create(String mainClassName, String commandLine, String address, boolean suspend)
          Creates a new instance of LaunchingDICookie for given parameters.
 String getClassName()
          Returns main class name.
 String getCommandLine()
          Returns command line to be used.
 boolean getSuspend()
          Returns suspended state.
static String getTransportName()
          Returns type of transport to be used.
 com.sun.jdi.VirtualMachine getVirtualMachine()
          Creates a new instance of VirtualMachine for this DebuggerInfo Cookie.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ID

public static final String ID
Public ID used for registration in Meta-inf/debugger.

See Also:
Constant Field Values
Method Detail

create

public static LaunchingDICookie create(String mainClassName,
                                       String commandLine,
                                       String address,
                                       boolean suspend)
Creates a new instance of LaunchingDICookie for given parameters.

Parameters:
mainClassName - a name or main class
commandLine - command line of debugged JVM
address - a address to listen on
suspend - if true session will be suspended
Returns:
a new instance of LaunchingDICookie for given parameters

create

public static LaunchingDICookie create(String mainClassName,
                                       String[] args,
                                       String classPath,
                                       boolean suspend)
Creates a new instance of LaunchingDICookie for given parameters.

Parameters:
mainClassName - a name or main class
args - command line arguments
classPath - a classPath
suspend - if true session will be suspended
Returns:
a new instance of LaunchingDICookie for given parameters

getTransportName

public static String getTransportName()
Returns type of transport to be used.

Returns:
type of transport to be used

getClassName

public String getClassName()
Returns main class name.

Returns:
main class name

getSuspend

public boolean getSuspend()
Returns suspended state.

Returns:
suspended state

getCommandLine

public String getCommandLine()
Returns command line to be used.

Returns:
command line to be used

getVirtualMachine

public com.sun.jdi.VirtualMachine getVirtualMachine()
                                             throws IOException,
                                                    com.sun.jdi.connect.IllegalConnectorArgumentsException,
                                                    com.sun.jdi.connect.VMStartException
Creates a new instance of VirtualMachine for this DebuggerInfo Cookie.

Specified by:
getVirtualMachine in class AbstractDICookie
Returns:
a new instance of VirtualMachine for this DebuggerInfo Cookie
Throws:
IOException
com.sun.jdi.connect.IllegalConnectorArgumentsException
com.sun.jdi.connect.VMStartException

 

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