org.openide.util.lookup
Class MetaInfServicesLookup

java.lang.Object
  extended by org.openide.util.Lookup
      extended by org.openide.util.lookup.AbstractLookup
          extended by org.openide.util.lookup.MetaInfServicesLookup
All Implemented Interfaces:
java.io.Serializable

final class MetaInfServicesLookup
extends AbstractLookup

A lookup that implements the JDK1.3 JAR services mechanism and delegates to META-INF/services/name.of.class files.

It is not dynamic - so if you need to change the classloader or JARs, wrap it in a ProxyLookup and change the delegate when necessary. Existing instances will be kept if the implementation classes are unchanged, so there is "stability" in doing this provided some parent loaders are the same as the previous ones.

If this is to be made public, please move it to the org.openide.util.lookup package; currently used by the core via reflection, until it is needed some other way.

Author:
Jaroslav Tulach, Jesse Glick
See Also:
"#14722"

Nested Class Summary
 
Nested classes/interfaces inherited from class org.openide.util.lookup.AbstractLookup
AbstractLookup.Content, AbstractLookup.Info, AbstractLookup.ISE, AbstractLookup.Pair<T>, AbstractLookup.R<T>, AbstractLookup.ReferenceIterator, AbstractLookup.ReferenceToResult<T>, AbstractLookup.Storage<Transaction>
 
Nested classes/interfaces inherited from class org.openide.util.Lookup
Lookup.Provider, Lookup.Result<T>, Lookup.Template<T>
 
Field Summary
 
Fields inherited from class org.openide.util.lookup.AbstractLookup
serialVersionUID
 
Fields inherited from class org.openide.util.Lookup
EMPTY
 
Constructor Summary
MetaInfServicesLookup(java.lang.ClassLoader loader, java.lang.String prefix)
          Create a lookup reading from a specified classloader.
 
Method Summary
protected  void beforeLookup(Lookup.Template t)
          Notifies subclasses that a query is about to be processed.
 java.lang.String toString()
           
 
Methods inherited from class org.openide.util.lookup.AbstractLookup
addPair, cleanUpResult, getPairsAsLHS, initialize, lookup, lookup, lookupItem, matches, modifyListenerList, notifyCollectedListeners, notifyListeners, removePair, setPairs, setPairsAndCollectListeners
 
Methods inherited from class org.openide.util.Lookup
getDefault, lookupAll, lookupResult
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MetaInfServicesLookup

public MetaInfServicesLookup(java.lang.ClassLoader loader,
                             java.lang.String prefix)
Create a lookup reading from a specified classloader.

Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class AbstractLookup

beforeLookup

protected final void beforeLookup(Lookup.Template t)
Description copied from class: AbstractLookup
Notifies subclasses that a query is about to be processed.

Overrides:
beforeLookup in class AbstractLookup
Parameters:
t - the template