|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.discovery.tools.DefaultClassHolder<T>
public class DefaultClassHolder<T>
Holder for a default class. Class may be specified by name (String) or class (Class). Using the holder complicates the users job, but minimized # of API's.
Constructor Summary | |
---|---|
DefaultClassHolder(java.lang.Class<S> defaultClass)
Creates a new holder implementation given the input SPI implementation/extension class. |
|
DefaultClassHolder(java.lang.String defaultName)
Creates a new holder implementation given the input SPI implementation/extension class name. |
Method Summary | ||
---|---|---|
|
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..). |
|
java.lang.String |
getDefaultName()
Returns the hold class name. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultClassHolder(java.lang.Class<S> defaultClass)
S
- Any type extends the SPI typedefaultClass
- The hold classpublic DefaultClassHolder(java.lang.String defaultName)
defaultName
- The hold class nameMethod Detail |
---|
public <S extends T> java.lang.Class<S> getDefaultClass(SPInterface<T> spi, ClassLoaders loaders)
S
- Any type extends the SPI typespi
- non-null SPIloaders
- Used only if class needs to be loaded.
public java.lang.String getDefaultName()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |