public class ModelRegistry extends AbstractComponentRegistry<Class<? extends Model>>
ComponentRegistry implementation for tracking all instances of Model classes
in a given project.| Constructor and Description |
|---|
ModelRegistry() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Class<? extends Model> model)
Adds a new mapping in the registry for the given object.
|
void |
addClasspathModels(String classpath) |
static ModelRegistry |
fromModelScan(ModelScan modelScan)
|
Iterable<Class<? extends Model>> |
getRegisteredComponents()
Returns only the registered objects, without their keyword aliases.
|
add, exists, exists, find, getRegistry, setRegistrypublic void addClasspathModels(String classpath)
public void add(Class<? extends Model> model)
ComponentRegistrymodel - The object to be registered.public Iterable<Class<? extends Model>> getRegisteredComponents()
ComponentRegistrygetRegisteredComponents in interface ComponentRegistry<Class<? extends Model>>getRegisteredComponents in class AbstractComponentRegistry<Class<? extends Model>>public static ModelRegistry fromModelScan(ModelScan modelScan) throws ClassNotFoundException
ModelScan annotation to supply Model
classes or classpath locations to be registered.modelScan - annotation instance from a configuration class.ModelRegistry, with scanned models.ClassNotFoundExceptionCopyright © 2016. All rights reserved.