org.apache.commons.discovery.tools
Class SPInterface
java.lang.Object
|
+--org.apache.commons.discovery.tools.SPInterface
- public class SPInterface
- extends java.lang.Object
Represents a Service Programming Interface (spi).
- SPI's name
- SPI's (provider) class
- SPI's (alternate) override property name
In addition, while there are many cases where this is NOT
usefull, for those in which it is:
- expected constructor argument types and parameters values.
- Author:
- Richard A. Sitze
|
Constructor Summary |
SPInterface(java.lang.Class provider)
Construct object representing Class provider. |
SPInterface(java.lang.Class provider,
java.lang.Class[] constructorParamClasses,
java.lang.Object[] constructorParams)
Construct object representing Class provider. |
SPInterface(java.lang.Class spi,
java.lang.String propertyName)
Construct object representing Class provider. |
SPInterface(java.lang.Class spi,
java.lang.String propertyName,
java.lang.Class[] constructorParamClasses,
java.lang.Object[] constructorParams)
Construct object representing Class provider. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SPInterface
public SPInterface(java.lang.Class provider)
- Construct object representing Class
provider.
- Parameters:
provider - The SPI class
SPInterface
public SPInterface(java.lang.Class spi,
java.lang.String propertyName)
- Construct object representing Class
provider.
- Parameters:
provider - The SPI classpropertyName - when looking for the name of a class implementing
the provider class, a discovery strategy may involve looking for
(system or other) properties having either the name of the class
(provider) or the propertyName.
SPInterface
public SPInterface(java.lang.Class provider,
java.lang.Class[] constructorParamClasses,
java.lang.Object[] constructorParams)
- Construct object representing Class
provider.
- Parameters:
provider - The SPI classconstructorParamClasses - classes representing the
constructor argument types.constructorParams - objects representing the
constructor arguments.
SPInterface
public SPInterface(java.lang.Class spi,
java.lang.String propertyName,
java.lang.Class[] constructorParamClasses,
java.lang.Object[] constructorParams)
- Construct object representing Class
provider.
- Parameters:
provider - The SPI classpropertyName - when looking for the name of a class implementing
the provider class, a discovery strategy may involve looking for
(system or other) properties having either the name of the class
(provider) or the propertyName.constructorParamClasses - classes representing the
constructor argument types.constructorParams - objects representing the
constructor arguments.
getSPName
public java.lang.String getSPName()
getSPClass
public java.lang.Class getSPClass()
getPropertyName
public java.lang.String getPropertyName()
newInstance
public java.lang.Object newInstance(java.lang.Class impl)
throws DiscoveryException,
java.lang.InstantiationException,
java.lang.IllegalAccessException,
java.lang.NoSuchMethodException,
java.lang.reflect.InvocationTargetException
- Instantiate a new
verifyAncestory
public void verifyAncestory(java.lang.Class impl)
Copyright (c) 2002 - Apache Software Foundation