Package | Description |
---|---|
org.apache.commons.discovery.tools |
Discovery tools implementations.
|
Modifier and Type | Method and Description |
---|---|
static <T> SPInterface<T> |
SPInterface.newSPInterface(Class<T> provider)
Construct object representing Class
provider . |
static <T> SPInterface<T> |
SPInterface.newSPInterface(Class<T> provider,
Class<?>[] constructorParamClasses,
Object[] constructorParams)
Construct object representing Class
provider . |
static <T> SPInterface<T> |
SPInterface.newSPInterface(Class<T> provider,
String propertyName)
Construct object representing Class
provider . |
static <T> SPInterface<T> |
SPInterface.newSPInterface(Class<T> provider,
String propertyName,
Class<?>[] constructorParamClasses,
Object[] constructorParams)
Construct object representing Class
provider . |
Modifier and Type | Method and Description |
---|---|
static <T> String[] |
DiscoverClass.discoverClassNames(SPInterface<T> spi,
Properties properties)
Discover names of SPI implementation Classes from properties.
|
static <T> T |
DiscoverSingleton.find(ClassLoaders loaders,
SPInterface<T> spi,
PropertiesHolder properties,
DefaultClassHolder<T> defaultImpl)
Find implementation of SPI.
|
static <T,S extends T> |
DiscoverClass.find(ClassLoaders loaders,
SPInterface<T> spi,
PropertiesHolder properties,
DefaultClassHolder<T> defaultImpl)
Find class implementing SPI.
|
<S extends T> |
DefaultClassHolder.getDefaultClass(SPInterface<T> spi,
ClassLoaders loaders)
Returns the default class, loading it if necessary
and verifying that it implements the SPI
(this forces the check, no way out..).
|
Properties |
PropertiesHolder.getProperties(SPInterface<?> spi,
ClassLoaders loaders)
Returns the
Properties instance, loaded if necessary from propertiesFileName . |
static <T> T |
DiscoverClass.newInstance(ClassLoaders loaders,
SPInterface<T> spi,
PropertiesHolder properties,
DefaultClassHolder<T> defaultImpl)
Create new instance of class implementing SPI.
|
static <T,S extends T> |
Service.providers(SPInterface<T> spi,
ClassLoaders loaders)
This version lets you specify constructor arguments..
|
Copyright © 2002-2012 Apache Software Foundation. All Rights Reserved.