com.bumptech.glide.provider
Class DataLoadProviderRegistry
java.lang.Object
com.bumptech.glide.provider.DataLoadProviderRegistry
public class DataLoadProviderRegistry
- extends Object
A class that allows DataLoadProvider
s to be registered and retrieved by the
data and resource classes they provide encoders and decoders for.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DataLoadProviderRegistry
public DataLoadProviderRegistry()
register
public <T,Z> void register(Class<T> dataClass,
Class<Z> resourceClass,
DataLoadProvider<T,Z> provider)
- Registers the given
DataLoadProvider
using the given classes so it can later
be retrieved using the given classes.
- Type Parameters:
T
- The type of the data that the provider provides encoders and decoders for.Z
- The type of the resource that the provider provides encoders and decoders for.- Parameters:
dataClass
- The class of the data that the provider provides encoders and decoders for.resourceClass
- The class of the resource that the provider provides encoders and decoders for.provider
- The provider.
get
public <T,Z> DataLoadProvider<T,Z> get(Class<T> dataClass,
Class<Z> resourceClass)
- Returns the currently registered
DataLoadProvider
for the given classes.
- Type Parameters:
T
- The type of the data that the provider provides encoders and decoders for.Z
- The type of the resource that the provider provides encoders and decoders for.- Parameters:
dataClass
- The class of the data that the provider provides encoders and decoders for.resourceClass
- The class of the resource that the provider provides encoders and decoders for.