Eclipse JDT
2.0

org.eclipse.jdt.launching
Class AbstractVMInstallType

java.lang.Object
  |
  +--org.eclipse.jdt.launching.AbstractVMInstallType
All Implemented Interfaces:
IExecutableExtension, IVMInstallType

public abstract class AbstractVMInstallType
extends Object
implements IVMInstallType, IExecutableExtension

Abstract implementation of a VM install type. Subclasses should implement

*

* Clients implementing VM install types should subclass this class. *


Constructor Summary
protected AbstractVMInstallType()
          Constructs a new VM install type.
 
Method Summary
 IVMInstall createVMInstall(String id)
          Creates a new instance of this VM Install type.
 void disposeVMInstall(String id)
          Remove the VM associated with the given id from the set of VMs managed by this VM type.
protected abstract  IVMInstall doCreateVMInstall(String id)
           
 IVMInstall findVMInstall(String id)
          Finds the VM with the given id.
 IVMInstall findVMInstallByName(String name)
          Finds the VM with the given name.
 String getId()
          Returns the globally unique id of this VM type.
 IVMInstall[] getVMInstalls()
          Returns all VM instances managed by this VM type.
 void setInitializationData(IConfigurationElement config, String propertyName, Object data)
          Initializes the id parameter from the "id" attribute in the configuration markup.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.jdt.launching.IVMInstallType
detectInstallLocation, getDefaultLibraryLocations, getName, validateInstallLocation
 

Constructor Detail

AbstractVMInstallType

protected AbstractVMInstallType()
Constructs a new VM install type.

Method Detail

getVMInstalls

public IVMInstall[] getVMInstalls()
Description copied from interface: IVMInstallType
Returns all VM instances managed by this VM type.

Specified by:
getVMInstalls in interface IVMInstallType
Returns:
the list of VM instances managed by this VM type

disposeVMInstall

public void disposeVMInstall(String id)
Description copied from interface: IVMInstallType
Remove the VM associated with the given id from the set of VMs managed by this VM type. Has no effect if a VM with the given id is not currently managed by this type. A VM install that is disposed may not be used anymore.

Specified by:
disposeVMInstall in interface IVMInstallType
Parameters:
id - the id of the VM to be disposed.

findVMInstall

public IVMInstall findVMInstall(String id)
Description copied from interface: IVMInstallType
Finds the VM with the given id.

Specified by:
findVMInstall in interface IVMInstallType
Parameters:
id - the VM id
Returns:
a VM instance, or null if not found

createVMInstall

public IVMInstall createVMInstall(String id)
                           throws IllegalArgumentException
Description copied from interface: IVMInstallType
Creates a new instance of this VM Install type. The newly created IVMInstall is managed by this IVMInstallType.

Specified by:
createVMInstall in interface IVMInstallType
Parameters:
id - An id String that must be unique within this IVMInstallType.
Returns:
the newly created VM instance
Throws:
IllegalArgumentException - If the id exists already.

doCreateVMInstall

protected abstract IVMInstall doCreateVMInstall(String id)

setInitializationData

public void setInitializationData(IConfigurationElement config,
                                  String propertyName,
                                  Object data)
                           throws CoreException
Initializes the id parameter from the "id" attribute in the configuration markup. Subclasses should not override this method.

Specified by:
setInitializationData in interface IExecutableExtension
CoreException
See Also:
IExecutableExtension.setInitializationData(org.eclipse.core.runtime.IConfigurationElement, java.lang.String, java.lang.Object)

getId

public String getId()
Description copied from interface: IVMInstallType
Returns the globally unique id of this VM type. Clients are reponsible for providing a unique id.

Specified by:
getId in interface IVMInstallType
Returns:
the id of this IVMInstallType

findVMInstallByName

public IVMInstall findVMInstallByName(String name)
Description copied from interface: IVMInstallType
Finds the VM with the given name.

Specified by:
findVMInstallByName in interface IVMInstallType
Parameters:
name - the VM name
Returns:
a VM instance, or null if not found
See Also:
IVMInstallType.findVMInstallByName(String)

Eclipse JDT
2.0

Copyright (c) IBM Corp. and others 2000, 2002. All Rights Reserved.