org.eclipse.wst.jsdt.launching

## Class AbstractVMInstall

- java.lang.Object
- - org.eclipse.wst.jsdt.launching.AbstractVMInstall

All Implemented Interfaces:
  IVMInstall, IVMInstall2, IVMInstall3

Direct Known Subclasses:
  StandardVM, VMStandin

    public abstract class AbstractVMInstall
    extends java.lang.Object
    implements IVMInstall, IVMInstall2, IVMInstall3

Abstract implementation of a VM install.

Clients implementing VM installs must subclass this class.

Provisional API: This class/interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.

### Constructor Summary

Constructors
Constructor and Description
`AbstractVMInstall(IVMInstallType type, java.lang.String id)` Constructs a new VM install.

### Method Summary

All Methods Instance Methods Concrete Methods
`protected void` `abort(java.lang.String message, java.lang.Throwable exception, int code)` Throws a core exception with an error status object built from the given message, lower level exception, and error code.
`boolean` `equals(java.lang.Object object)`
`java.lang.String` `getId()` Returns the id for this VM.
`java.io.File` `getInstallLocation()` Returns the root directory of the install location of this VM.
`java.net.URL` `getJavadocLocation()` Returns the jsdoc location associated with this VM install.
`java.lang.String` `getJavaVersion()` Returns a string representing the `java.version` system property of this VM install, or `null` if unknown.
`LibraryLocation[]` `getLibraryLocations()` Returns the library locations of this IVMInstall.
`java.lang.String` `getName()` Returns the display name of this VM.
`java.lang.String` `getVMArgs()` Returns VM arguments to be used with this vm install whenever this VM is launched as a raw string, or `null` if none.
`java.lang.String[]` `getVMArguments()` Returns VM arguments to be used with this vm install whenever this VM is launched as they should be passed to the command line, or `null` if none.
`IVMInstallType` `getVMInstallType()` Returns the VM type of this VM.
`IVMRunner` `getVMRunner(java.lang.String mode)` Returns a VM runner that runs this installed VM in the given mode.
`int` `hashCode()`
`void` `setInstallLocation(java.io.File installLocation)` Sets the root directory of the install location of this VM.
`void` `setJavadocLocation(java.net.URL url)` Sets the jsdoc location associated with this VM install.
`void` `setLibraryLocations(LibraryLocation[] locations)` Sets the library locations of this IVMInstall.
`void` `setName(java.lang.String name)` Sets the display name of this VM.
`protected void` `setNotify(boolean notify)` Whether this VM should fire property change notifications.
`void` `setVMArgs(java.lang.String vmArgs)` Sets VM arguments to be used with this vm install whenever this VM is launched as a raw string, possibly `null`.
`void` `setVMArguments(java.lang.String[] vmArgs)` Sets VM arguments to be used with this vm install whenever this VM is launched, possibly `null`.

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### AbstractVMInstall

    public AbstractVMInstall(IVMInstallType type,
                             java.lang.String id)

Constructs a new VM install.

Parameters:
  `type` - The type of this VM install. Must not be `null`
  `id` - The unique identifier of this VM instance Must not be `null`.
Throws:
  `java.lang.IllegalArgumentException` - if any of the required parameters are `null`.

### Method Detail

#### getId

    public java.lang.String getId()

Description copied from interface: `IVMInstall`
Returns the id for this VM. VM IDs are unique within the VMs of a given VM type. The VM id is not intended to be presented to users.

Specified by:
  `getId` in interface `IVMInstall`
Returns:
  the VM identifier. Must not return `null`.

#### getName

    public java.lang.String getName()

Description copied from interface: `IVMInstall`
Returns the display name of this VM. The VM name is intended to be presented to users.

Specified by:
  `getName` in interface `IVMInstall`
Returns:
  the display name of this VM. May return `null`.

#### setName

    public void setName(java.lang.String name)

Description copied from interface: `IVMInstall`
Sets the display name of this VM. The VM name is intended to be presented to users.

Specified by:
  `setName` in interface `IVMInstall`
Parameters:
  `name` - the display name of this VM

#### getInstallLocation

    public java.io.File getInstallLocation()

Description copied from interface: `IVMInstall`
Returns the root directory of the install location of this VM.

Specified by:
  `getInstallLocation` in interface `IVMInstall`
Returns:
  the root directory of this VM installation. May return `null`.

#### setInstallLocation

    public void setInstallLocation(java.io.File installLocation)

Description copied from interface: `IVMInstall`
Sets the root directory of the install location of this VM.

Specified by:
  `setInstallLocation` in interface `IVMInstall`
Parameters:
  `installLocation` - the root directory of this VM installation

#### getVMInstallType

    public IVMInstallType getVMInstallType()

Description copied from interface: `IVMInstall`
Returns the VM type of this VM.

Specified by:
  `getVMInstallType` in interface `IVMInstall`
Returns:
  the VM type that created this IVMInstall instance

#### getVMRunner

    public IVMRunner getVMRunner(java.lang.String mode)

Description copied from interface: `IVMInstall`
Returns a VM runner that runs this installed VM in the given mode.

Specified by:
  `getVMRunner` in interface `IVMInstall`
Parameters:
  `mode` - the mode the VM should be launched in; one of the constants declared in `org.eclipse.debug.core.ILaunchManager`
Returns:
  a VMRunner for a given mode May return `null` if the given mode is not supported by this VM.
See Also:
  `org.eclipse.debug.core.ILaunchManager`

#### getLibraryLocations

    public LibraryLocation[] getLibraryLocations()

Description copied from interface: `IVMInstall`
Returns the library locations of this IVMInstall. Generally, clients should use `JavaRuntime.getLibraryLocations(IVMInstall)` to determine the libraries associated with this VM install.

Specified by:
  `getLibraryLocations` in interface `IVMInstall`
Returns:
  The library locations of this IVMInstall. Returns `null` to indicate that this VM install uses the default library locations associated with this VM's install type.
See Also:
  `IVMInstall.setLibraryLocations(LibraryLocation[])`

#### setLibraryLocations

    public void setLibraryLocations(LibraryLocation[] locations)

Description copied from interface: `IVMInstall`
Sets the library locations of this IVMInstall.

Specified by:
  `setLibraryLocations` in interface `IVMInstall`
Parameters:
  `locations` - The `LibraryLocation`s to associate with this IVMInstall. May be `null` to indicate that this VM install uses the default library locations associated with this VM's install type.

#### getJavadocLocation

    public java.net.URL getJavadocLocation()

Description copied from interface: `IVMInstall`
Returns the jsdoc location associated with this VM install.

Specified by:
  `getJavadocLocation` in interface `IVMInstall`
Returns:
  a url pointing to the jsdoc location associated with this VM install, or `null` if none

#### setJavadocLocation

    public void setJavadocLocation(java.net.URL url)

Description copied from interface: `IVMInstall`
Sets the jsdoc location associated with this VM install.

Specified by:
  `setJavadocLocation` in interface `IVMInstall`
Parameters:
  `url` - a url pointing to the jsdoc location associated with this VM install

#### setNotify

    protected void setNotify(boolean notify)

Whether this VM should fire property change notifications.

Parameters:
  `notify` -

#### equals

    public boolean equals(java.lang.Object object)

Overrides:
  `equals` in class `java.lang.Object`

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `java.lang.Object`

#### getVMArguments

    public java.lang.String[] getVMArguments()

Description copied from interface: `IVMInstall`
Returns VM arguments to be used with this vm install whenever this VM is launched as they should be passed to the command line, or `null` if none.

Specified by:
  `getVMArguments` in interface `IVMInstall`
Returns:
  VM arguments to be used with this vm install whenever this VM is launched as they should be passed to the command line, or `null` if none

#### setVMArguments

    public void setVMArguments(java.lang.String[] vmArgs)

Description copied from interface: `IVMInstall`
Sets VM arguments to be used with this vm install whenever this VM is launched, possibly `null`. This is equivalent to `setVMArgs(String)` with whitespace character delimited arguments.

Specified by:
  `setVMArguments` in interface `IVMInstall`
Parameters:
  `vmArgs` - VM arguments to be used with this vm install whenever this VM is launched, possibly `null`

#### getVMArgs

    public java.lang.String getVMArgs()

Description copied from interface: `IVMInstall2`
Returns VM arguments to be used with this vm install whenever this VM is launched as a raw string, or `null` if none.

Specified by:
  `getVMArgs` in interface `IVMInstall2`
Returns:
  VM arguments to be used with this vm install whenever this VM is launched as a raw string, or `null` if none

#### setVMArgs

    public void setVMArgs(java.lang.String vmArgs)

Description copied from interface: `IVMInstall2`
Sets VM arguments to be used with this vm install whenever this VM is launched as a raw string, possibly `null`.

Specified by:
  `setVMArgs` in interface `IVMInstall2`
Parameters:
  `vmArgs` - VM arguments to be used with this vm install whenever this VM is launched as a raw string, possibly `null`

#### getJavaVersion

    public java.lang.String getJavaVersion()

Description copied from interface: `IVMInstall2`
Returns a string representing the `java.version` system property of this VM install, or `null` if unknown.

Specified by:
  `getJavaVersion` in interface `IVMInstall2`
Returns:
  a string representing the `java.version` system property of this VM install, or `null` if unknown.

#### abort

    protected void abort(java.lang.String message,
                         java.lang.Throwable exception,
                         int code)
                  throws CoreException

Throws a core exception with an error status object built from the given message, lower level exception, and error code.

Parameters:
  `message` - the status message
  `exception` - lower level exception associated with the error, or `null` if none
  `code` - error code
Throws:
  `CoreException` - the "abort" core exception