|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bumptech.glide.load.model.GenericLoaderFactory
public class GenericLoaderFactory
Maintains a map of model class to factory to retrieve a ModelLoaderFactory
and/or a ModelLoader
for a given model type.
Constructor Summary | |
---|---|
GenericLoaderFactory(Context context)
|
Method Summary | ||
---|---|---|
|
buildModelLoader(Class<T> modelClass,
Class<Y> resourceClass)
Returns a ModelLoader for the given model and resource classes by either returning a cached
ModelLoader or building a new a new ModelLoader using registered ModelLoaderFactory s. |
|
|
buildModelLoader(Class<T> modelClass,
Class<Y> resourceClass,
Context context)
Deprecated. Use buildModelLoader(Class, Class) instead. Scheduled to be removed in Glide 4.0. |
|
|
register(Class<T> modelClass,
Class<Y> resourceClass,
ModelLoaderFactory<T,Y> factory)
Registers the given ModelLoaderFactory for the given model and resource classes and returns the previous
factory registered for the given model and resource classes or null if no such factory existed. |
|
|
unregister(Class<T> modelClass,
Class<Y> resourceClass)
Removes and returns the registered ModelLoaderFactory for the given model and resource classes. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GenericLoaderFactory(Context context)
Method Detail |
---|
public <T,Y> ModelLoaderFactory<T,Y> unregister(Class<T> modelClass, Class<Y> resourceClass)
ModelLoaderFactory
for the given model and resource classes. Returns
null if no such factory is registered. Clears all cached model loaders.
T
- The type of the model the class.Y
- The type of the resource class.modelClass
- The model class.resourceClass
- The resource class.public <T,Y> ModelLoaderFactory<T,Y> register(Class<T> modelClass, Class<Y> resourceClass, ModelLoaderFactory<T,Y> factory)
ModelLoaderFactory
for the given model and resource classes and returns the previous
factory registered for the given model and resource classes or null if no such factory existed. Clears all cached
model loaders.
T
- The type of the model.Y
- The type of the resource.modelClass
- The model class.resourceClass
- The resource class.factory
- The factory to register.@Deprecated public <T,Y> ModelLoader<T,Y> buildModelLoader(Class<T> modelClass, Class<Y> resourceClass, Context context)
buildModelLoader(Class, Class)
instead. Scheduled to be removed in Glide 4.0.
ModelLoader
for the given model and resource classes by either returning a cached
ModelLoader
or building a new a new ModelLoader
using registered ModelLoaderFactory
s.
Returns null if no ModelLoaderFactory
is registered for the given classes.
T
- The type of the model.Y
- The type of the resource.modelClass
- The model class.resourceClass
- The resource class.context
- Unusedpublic <T,Y> ModelLoader<T,Y> buildModelLoader(Class<T> modelClass, Class<Y> resourceClass)
ModelLoader
for the given model and resource classes by either returning a cached
ModelLoader
or building a new a new ModelLoader
using registered ModelLoaderFactory
s.
Returns null if no ModelLoaderFactory
is registered for the given classes.
T
- The type of the model.Y
- The type of the resource.modelClass
- The model class.resourceClass
- The resource class.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |