public abstract class AbstractVMInstall extends Object implements IVMInstall, IVMInstall2, IVMInstall3
Clients implementing VM installs must subclass this class.
| Constructor and Description |
|---|
AbstractVMInstall(IVMInstallType type,
String id)
Constructs a new VM install.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
abort(String message,
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(Object object) |
Map |
evaluateSystemProperties(String[] properties,
IProgressMonitor monitor)
Evaluates the specified system properties in this VM, returning the result
as a map of property names to property values.
|
String |
getId()
Returns the id for this VM.
|
File |
getInstallLocation()
Returns the root directory of the install location of this VM.
|
URL |
getJavadocLocation()
Returns the Javadoc location associated with this VM install.
|
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.
|
String |
getName()
Returns the display name of this VM.
|
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. |
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(String mode)
Returns a VM runner that runs this installed VM in the given mode.
|
int |
hashCode() |
void |
setInstallLocation(File installLocation)
Sets the root directory of the install location of this VM.
|
void |
setJavadocLocation(URL url)
Sets the Javadoc location associated with this VM install.
|
void |
setLibraryLocations(LibraryLocation[] locations)
Sets the library locations of this IVMInstall.
|
void |
setName(String name)
Sets the display name of this VM.
|
protected void |
setNotify(boolean notify)
Whether this VM should fire property change notifications.
|
void |
setVMArgs(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(String[] vmArgs)
Sets VM arguments to be used with this vm install whenever this
VM is launched, possibly
null. |
public AbstractVMInstall(IVMInstallType type, String id)
type - The type of this VM install.
Must not be nullid - The unique identifier of this VM instance
Must not be null.IllegalArgumentException - if any of the required
parameters are null.public String getId()
IVMInstallgetId in interface IVMInstallnull.public String getName()
IVMInstallgetName in interface IVMInstallnull.public void setName(String name)
IVMInstallsetName in interface IVMInstallname - the display name of this VMpublic File getInstallLocation()
IVMInstallgetInstallLocation in interface IVMInstallnull.public void setInstallLocation(File installLocation)
IVMInstallsetInstallLocation in interface IVMInstallinstallLocation - the root directory of this VM installationpublic IVMInstallType getVMInstallType()
IVMInstallgetVMInstallType in interface IVMInstallpublic IVMRunner getVMRunner(String mode)
IVMInstallgetVMRunner in interface IVMInstallmode - the mode the VM should be launched in; one of the constants
declared in org.eclipse.debug.core.ILaunchManagernull if the given mode
is not supported by this VM.ILaunchManagerpublic LibraryLocation[] getLibraryLocations()
IVMInstallJavaRuntime.getLibraryLocations(IVMInstall)
to determine the libraries associated with this VM install.getLibraryLocations in interface IVMInstallnull to indicate that this VM install uses
the default library locations associated with this VM's install type.IVMInstall.setLibraryLocations(LibraryLocation[])public void setLibraryLocations(LibraryLocation[] locations)
IVMInstallsetLibraryLocations in interface IVMInstalllocations - The LibraryLocations 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.public URL getJavadocLocation()
IVMInstallgetJavadocLocation in interface IVMInstallnull if nonepublic void setJavadocLocation(URL url)
IVMInstallsetJavadocLocation in interface IVMInstallurl - a url pointing to the Javadoc location associated with
this VM installprotected void setNotify(boolean notify)
notify - public String[] getVMArguments()
IVMInstallnull if none.getVMArguments in interface IVMInstallnull if nonepublic void setVMArguments(String[] vmArgs)
IVMInstallnull. This is equivalent
to setVMArgs(String) with whitespace character delimited
arguments.setVMArguments in interface IVMInstallvmArgs - VM arguments to be used with this vm install whenever this
VM is launched, possibly nullpublic String getVMArgs()
IVMInstall2null if none.getVMArgs in interface IVMInstall2null if nonepublic void setVMArgs(String vmArgs)
IVMInstall2null.setVMArgs in interface IVMInstall2vmArgs - VM arguments to be used with this vm install whenever this
VM is launched as a raw string, possibly nullpublic String getJavaVersion()
IVMInstall2java.version system property
of this VM install, or null if unknown.getJavaVersion in interface IVMInstall2java.version system property
of this VM install, or null if unknown.public Map evaluateSystemProperties(String[] properties, IProgressMonitor monitor) throws CoreException
IVMInstall3evaluateSystemProperties in interface IVMInstall3properties - the property names to evaluate, for example {"user.home"}monitor - progress monitor or nullCoreException - if an exception occurs evaluating the propertiesprotected void abort(String message, Throwable exception, int code) throws CoreException
message - the status messageexception - lower level exception associated with the error, or
null if nonecode - error codeCoreException - the "abort" core exceptionCopyright (c) IBM Corp. and others 2000, 2006. All Rights Reserved.