org.openide
Class ServiceType.Registry

java.lang.Object
  |
  +--org.openide.ServiceType.Registry
All Implemented Interfaces:
Serializable
Enclosing class:
ServiceType

public abstract static class ServiceType.Registry
extends Object
implements Serializable

The registry of all services. This class is provided by the implementation of the IDE and should hold all of the services registered to the system.

This class can be serialized to securely save settings of all services in the system.

See Also:
Serialized Form

Constructor Summary
ServiceType.Registry()
           
 
Method Summary
 ServiceType find(Class clazz)
          Find the service type implemented as a given class.
 ServiceType find(String name)
          Find a service type of a supplied name in the registry.
abstract  List getServiceTypes()
          Getter for list of all service types.
abstract  Enumeration services()
          Get all available services managed by the engine.
 Enumeration services(Class clazz)
          Get all available services that are assignable to the given superclass.
abstract  void setServiceTypes(List arr)
          Setter for list of service types.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceType.Registry

public ServiceType.Registry()
Method Detail

services

public abstract Enumeration services()
Get all available services managed by the engine.
Returns:
an enumeration of ServiceTypes

services

public Enumeration services(Class clazz)
Get all available services that are assignable to the given superclass.
Parameters:
clazz - the class that all services should be subclass of
Returns:
an enumeration of all matching ServiceTypes

getServiceTypes

public abstract List getServiceTypes()
Getter for list of all service types.
Returns:
a list of ServiceTypes

setServiceTypes

public abstract void setServiceTypes(List arr)
Setter for list of service types. This permits changing instances of the objects but only within the types that are already registered in the system by manifest sections. If an instance of any other type is in the list it is ignored.
Parameters:
arr - a list of ServiceTypes

find

public ServiceType find(Class clazz)
Find the service type implemented as a given class. The whole registry is searched for a service type of that exact class (subclasses do not count).

This could be used during (de-)serialization of a service type: only store its class name and then try to find the type implemented by that class later.

Parameters:
clazz - the class of the service type looked for
Returns:
the desired type or null if it does not exist

find

public ServiceType find(String name)
Find a service type of a supplied name in the registry.

This could be used during (de-)serialization of a service type: only store its name and then try to find the type later.

Parameters:
name - (display) name of service type to find
Returns:
the desired type or null if it does not exist


Built on December 12 2001.  |  Portions Copyright 1997-2001 Sun Microsystems, Inc. All rights reserved.