public class ModelLoaderRegistry extends Object
ModelLoader
s and the model and data types they handle in
order from highest priority to lowest.Constructor and Description |
---|
ModelLoaderRegistry(Pools.Pool<List<Throwable>> throwableListPool) |
Modifier and Type | Method and Description |
---|---|
<Model,Data> |
append(Class<Model> modelClass,
Class<Data> dataClass,
ModelLoaderFactory<? extends Model,? extends Data> factory) |
<Model,Data> |
build(Class<Model> modelClass,
Class<Data> dataClass) |
List<Class<?>> |
getDataClasses(Class<?> modelClass) |
<A> List<ModelLoader<A,?>> |
getModelLoaders(A model) |
<Model,Data> |
prepend(Class<Model> modelClass,
Class<Data> dataClass,
ModelLoaderFactory<? extends Model,? extends Data> factory) |
<Model,Data> |
remove(Class<Model> modelClass,
Class<Data> dataClass) |
<Model,Data> |
replace(Class<Model> modelClass,
Class<Data> dataClass,
ModelLoaderFactory<? extends Model,? extends Data> factory) |
public ModelLoaderRegistry(@NonNull Pools.Pool<List<Throwable>> throwableListPool)
public <Model,Data> void append(@NonNull Class<Model> modelClass, @NonNull Class<Data> dataClass, @NonNull ModelLoaderFactory<? extends Model,? extends Data> factory)
public <Model,Data> void prepend(@NonNull Class<Model> modelClass, @NonNull Class<Data> dataClass, @NonNull ModelLoaderFactory<? extends Model,? extends Data> factory)
public <Model,Data> void remove(@NonNull Class<Model> modelClass, @NonNull Class<Data> dataClass)
public <Model,Data> void replace(@NonNull Class<Model> modelClass, @NonNull Class<Data> dataClass, @NonNull ModelLoaderFactory<? extends Model,? extends Data> factory)
@NonNull public <A> List<ModelLoader<A,?>> getModelLoaders(@NonNull A model)
public <Model,Data> ModelLoader<Model,Data> build(@NonNull Class<Model> modelClass, @NonNull Class<Data> dataClass)