FreeHEP API
Version current

org.freehep.util
Class FreeHEPLookup

java.lang.Object
  extended byorg.openide.util.Lookup
      extended byorg.freehep.util.FreeHEPLookup

public class FreeHEPLookup
extends org.openide.util.Lookup

A simple lookup which allows adding and removing items. This is just a simple front-end to the netbeans lookup api. It provides the ability to lookup classes registered via the Sun service provider mechanism or registered directly with this class.

Version:
$Id: FreeHEPLookup.java,v 1.6 2003/05/29 22:25:42 tonyj Exp $
Author:
tonyj
See Also:
The Netbeans Lookup API, The service provider mechanism
Source Code:
FreeHEPLookup.java

Nested Class Summary
 
Nested classes inherited from class org.openide.util.Lookup
org.openide.util.Lookup.Item, org.openide.util.Lookup.Provider, org.openide.util.Lookup.Result, org.openide.util.Lookup.Template
 
Field Summary
 
Fields inherited from class org.openide.util.Lookup
EMPTY
 
Method Summary
 void add(Object instance)
          Add an instance of an Object to the lookup.
 void add(Object instance, String id)
          Add an instance with an ID.
 void add(Object instance, String[] ids)
          Add an instance with multiple IDs.
static FreeHEPLookup instance()
          Access a singleton instance of FreeHEPLookup.ProxyLookup
 Object lookup(Class clazz)
           
 org.openide.util.Lookup.Result lookup(org.openide.util.Lookup.Template template)
           
 void remove(Object instance)
          Remove an instance from the lookup
 void remove(Object instance, String id)
          Remove an instance with a specific ID.
 void remove(Object instance, String[] ids)
          Remove an instance with multiple IDs
 void setClassLoader(ClassLoader loader)
          Sets the ClassLoader used for subsequent service API lookups
 
Methods inherited from class org.openide.util.Lookup
getDefault, lookupItem
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

instance

public static FreeHEPLookup instance()
Access a singleton instance of FreeHEPLookup.ProxyLookup

Returns:
The singleton instance of FreeHEPLookup

add

public void add(Object instance)
Add an instance of an Object to the lookup.

Parameters:
instance - The object to add.

add

public void add(Object instance,
                String id)
Add an instance with an ID.

Parameters:
instance - The instance to add.
id - The ID associated with the instance

add

public void add(Object instance,
                String[] ids)
Add an instance with multiple IDs.

Parameters:
instance - The instance to add.
ids - The IDs associated with the instance.

remove

public void remove(Object instance)
Remove an instance from the lookup

Parameters:
instance - The instance to remove

remove

public void remove(Object instance,
                   String id)
Remove an instance with a specific ID.

Parameters:
instance - The instance to remove
id - The ID of the instance

remove

public void remove(Object instance,
                   String[] ids)
Remove an instance with multiple IDs

Parameters:
instance - The instance to remove
ids - The IDs of the instance

setClassLoader

public void setClassLoader(ClassLoader loader)
Sets the ClassLoader used for subsequent service API lookups

Parameters:
loader - The ClassLoader to use.

lookup

public org.openide.util.Lookup.Result lookup(org.openide.util.Lookup.Template template)

lookup

public Object lookup(Class clazz)

FreeHEP API
Version current

Copyright © 2000-2004 FreeHEP, All Rights Reserved.