org.scaladebugger.api.utils

JDITools

object JDITools extends JDITools

Exposes utility methods related to the Java Debugger Interface.

Linear Supertypes
JDITools, JDILoader, Logging, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. JDITools
  2. JDITools
  3. JDILoader
  4. Logging
  5. AnyRef
  6. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. implicit class LoggerExtras extends AnyRef

    Definition Classes
    Logging

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def classForName(name: String, initialize: Boolean = true, classLoader: ClassLoader = getSystemClassLoader): Class[_]

    Attempts to load the specified class.

    Attempts to load the specified class.

    name

    The full name of the class to load

    initialize

    If true, initializes the class

    classLoader

    The class loader to use for loading the class, defaults to the system class loader

    returns

    The class loaded by the class loader

    Attributes
    protected
    Definition Classes
    JDILoader
    Annotations
    @throws( classOf[ClassNotFoundException] )
    Exceptions thrown
    ClassNotFoundException

    If the class was not found using the class loader or any of its parents

    Note

    Exposed for testing!

  8. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  11. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. def findPotentialJdkJarPaths(jarPath: String): Seq[String]

    Attempts to find potential paths for a jar in the JDK.

    Attempts to find potential paths for a jar in the JDK.

    jarPath

    The path to the jar relative to the JDK

    returns

    The sequence of potential paths

    Attributes
    protected
    Definition Classes
    JDILoader
  13. def generateJdwpString(port: Int, transport: String = "dt_socket", server: Boolean = true, suspend: Boolean = false, hostname: String = ""): String

    Generates a JDWP string for use when launching JVMs.

    Generates a JDWP string for use when launching JVMs.

    port

    The port used to connect to a debugger or listen for debugger connections

    transport

    The means of communication (defaults to dt_socket)

    server

    If true, indicates that the target JVM should run as a server listening on the provided port for debugger connections; if false, indicates that the target JVM should connect to a debugger using the provided port

    suspend

    If true, indicates that the target JVM should start up suspended until a connection with a debugger has been established

    hostname

    If provided, used as the hostname to connect or bind to depending on the server flag

    returns

    The string representing the JDWP settings

    Definition Classes
    JDITools
  14. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  15. def getJavaClassPath: String

    Retrieves the system property for java.

    Retrieves the system property for java.class.path.

    returns

    The string representing the 'java.class.path' system property

    Attributes
    protected
    Definition Classes
    JDITools
  16. def getPathSeparator: String

    Retrieves the system property for path.

    Retrieves the system property for path.separator.

    returns

    The string representing the 'path.separator' system property

    Attributes
    protected
    Definition Classes
    JDITools
  17. def getSystemClassLoader: ClassLoader

    Retrieves the system classloader.

    Retrieves the system classloader.

    returns

    The system classloader instance

    Attributes
    protected
    Definition Classes
    JDIToolsJDILoader
  18. def getUserDir: String

    Retrieves the system property for user.

    Retrieves the system property for user.dir.

    returns

    The string representing the 'user.dir' system property

    Attributes
    protected
    Definition Classes
    JDITools
  19. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  20. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  21. def isJdiAvailable(classLoader: ClassLoader = _classLoader): Boolean

    Checks if it is possible to use the JDI using either the given class loader or by using a jar located in the JDK (if possible).

    Checks if it is possible to use the JDI using either the given class loader or by using a jar located in the JDK (if possible).

    classLoader

    The class loader to use to check for JDI (default is this class's class loader)

    returns

    True if JDI is able to be loaded, otherwise false

    Definition Classes
    JDILoader
  22. def javaProcesses(javaProcessFunc: (String) ⇒ Option[JavaProcess] = ...): Seq[JavaProcess]

    Collects a list of active Java processes using the JPS tool.

    Collects a list of active Java processes using the JPS tool.

    javaProcessFunc

    Optional function to convert line of text into a Java process instance

    returns

    The collection of active Java processes

    Definition Classes
    JDITools
    Note

    Will fail if the JPS tool is not on PATH.

  23. def jvmClassPath: String

    Retrieves a JVM classpath string that contains the current classpath.

    Retrieves a JVM classpath string that contains the current classpath.

    returns

    The classpath as a string

    Definition Classes
    JDITools
  24. val logger: Logger

    Attributes
    protected
    Definition Classes
    Logging
  25. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  26. def newJDIProcess(): JDIProcess

    Creates a new JDI process instance.

    Creates a new JDI process instance.

    returns

    The new JDI process instance

    Attributes
    protected
    Definition Classes
    JDITools
  27. final def notify(): Unit

    Definition Classes
    AnyRef
  28. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  29. def scalaClassStringToFileString(classString: String): String

    Converts a class string to a file string.

    Converts a class string to a file string.

    classString

    The class string to convert

    returns

    The resulting file string

    Definition Classes
    JDITools
    Example:
    1. org.senkbeil.MyClass becomes org/senkbeil/MyClass.scala

  30. def spawn(className: String, port: Int, hostname: String = "", server: Boolean = true, suspend: Boolean = false, args: Seq[String] = Nil, options: Seq[String] = Nil): Process

    Spawns a new Scala process using the provided class name as the entrypoint.

    Spawns a new Scala process using the provided class name as the entrypoint.

    className

    The name of the class to use as the entrypoint for the Scala process

    port

    The port to use for the Scala process to listen on

    hostname

    Optional hostname to use for the Scala process to listen on

    server

    Whether or not to launch the process as a server waiting for a debugger connection or a client connecting to a listening debugger

    suspend

    Whether or not to start the process suspended until a debugger attaches to it or it attaches to a debugger

    args

    The collection of arguments to pass to the Scala process

    options

    Any additional JVM options to pass to the Scala process

    returns

    The created Scala process

    Definition Classes
    JDITools
    Note

    Assumes that Scala is available on the path!

  31. def spawnJavaProcessRetrieval(): Process

    Spawns a new process to retrieve the list of Java processes.

    Spawns a new process to retrieve the list of Java processes.

    returns

    The process instance

    Attributes
    protected
    Definition Classes
    JDITools
  32. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  33. def toString(): String

    Definition Classes
    AnyRef → Any
  34. def tryLoadJdi(classLoader: ClassLoader = _classLoader): Boolean

    Attempts to ensure that the JDI is loaded.

    Attempts to ensure that the JDI is loaded. First, checks if the JDI is already available. If not, attempts to find a JDK path and load it.

    classLoader

    The class loader to use to check for JDI (default is this class's class loader)

    returns

    True if successful, otherwise false

    Definition Classes
    JDILoader
  35. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  36. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  37. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from JDITools

Inherited from JDILoader

Inherited from Logging

Inherited from AnyRef

Inherited from Any

Ungrouped