S
- this class typeT
- target provider typepublic abstract class BaseProfile<S extends BaseProfile<S,T>,T extends BaseProvider<S>> extends Object
Modifier and Type | Field and Description |
---|---|
static char |
QUALIFIER
Key qualifier.
|
Constructor and Description |
---|
BaseProfile() |
Modifier and Type | Method and Description |
---|---|
T |
createProvider()
Creates a new provider instance
and attach this profile to the created instance.
|
ClassLoader |
getClassLoader()
Deprecated.
use
getContext() instead |
abstract ProfileContext |
getContext()
Returns the current profile context.
|
abstract Class<? extends T> |
getProviderClass()
Returns the class of corresponded provider.
|
protected abstract S |
getThis()
Returns this object.
|
protected static <T extends BaseProvider<?>> |
loadProviderClass(String className,
ProfileContext context,
Class<T> providerInterface)
Loads the specified class from the class loader.
|
public static final char QUALIFIER
public abstract Class<? extends T> getProviderClass()
public abstract ProfileContext getContext()
@Deprecated public ClassLoader getClassLoader()
getContext()
insteadprotected abstract S getThis()
protected static <T extends BaseProvider<?>> Class<? extends T> loadProviderClass(String className, ProfileContext context, Class<T> providerInterface)
T
- provider interface typeclassName
- target class namecontext
- the current profile contextproviderInterface
- provider interfaceIllegalArgumentException
- if failed to load the specified class, or any parameter is null
public T createProvider() throws IOException
IOException
- if failed to create an instance or attach this profileCopyright © 2011–2019 Asakusa Framework Team. All rights reserved.