com.bumptech.glide.provider
Class DataLoadProviderRegistry

java.lang.Object
  extended by com.bumptech.glide.provider.DataLoadProviderRegistry

public class DataLoadProviderRegistry
extends Object

A class that allows DataLoadProviders to be registered and retrieved by the data and resource classes they provide encoders and decoders for.


Constructor Summary
DataLoadProviderRegistry()
           
 
Method Summary
<T,Z> DataLoadProvider<T,Z>
get(Class<T> dataClass, Class<Z> resourceClass)
          Returns the currently registered DataLoadProvider for the given classes.
<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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataLoadProviderRegistry

public DataLoadProviderRegistry()
Method Detail

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.