|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jaitools.lookup.Lookup
public class Lookup
This class offers minimal Service Provider Interface lookup functions.
Within JAITools it is used to find implementations of non-operator interfaces
such as org.jaitools.numeric.Processor. Class names are read from registry
files in the META-INF/services folder. Each registry file name corresponds to a
fully qualified interface name. File format is one class name per line. Comment
lines are prefixed with a hash (#) character. Blank lines are permitted.
Each time a registry file is read its contents are cached (weakly) for subsequent lookups.
Discovery of image operators is done using the standard JAI mechanisms.
| Constructor Summary | |
|---|---|
Lookup()
|
|
| Method Summary | |
|---|---|
static void |
clearCache()
Clear any cached lookups. |
static Map<String,List<Class>> |
getCachedProviders()
Returns a copy of the cached lookups as a Map with
service provider interface names as keys and lists of implementing
classes as values. |
static List<Class> |
getProviders(String spiName)
Get classes that implement the given service provider interface. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Lookup()
| Method Detail |
|---|
public static List<Class> getProviders(String spiName)
spiName - the fully qualified name of the interface
public static void clearCache()
public static Map<String,List<Class>> getCachedProviders()
Map with
service provider interface names as keys and lists of implementing
classes as values.
This method was added for testing purposes.
Map (may be empty)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||