public class DefaultClassHolder<T> extends Object
| Constructor and Description |
|---|
DefaultClassHolder(Class<S> defaultClass)
Creates a new holder implementation given
the input SPI implementation/extension class.
|
DefaultClassHolder(String defaultName)
Creates a new holder implementation given
the input SPI implementation/extension class name.
|
| Modifier and Type | Method and Description |
|---|---|
<S extends T> |
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..).
|
String |
getDefaultName()
Returns the hold class name.
|
public DefaultClassHolder(Class<S> defaultClass)
S - Any type extends the SPI typedefaultClass - The hold classpublic DefaultClassHolder(String defaultName)
defaultName - The hold class namepublic <S extends T> 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 String getDefaultName()
Copyright © 2002–2025 The Apache Software Foundation. All rights reserved.