...
Method | Description |
---|---|
<T> T get(Class<T> type, String path); | Creates an object of class type and maps it from a resource from under specified path |
<T> T get(Class<T> type, Resource resource); | Creates an object of class type and maps it from the resource |
<T> T get(com.google.inject.Key<T> key, String path) throws ClassNotFoundException; | Creates an object identified by key type and maps it from the resource under specified path |
<T> T get(com.google.inject.Key<T> key, Resource resource); | Creates an object identified by key type and maps it from the resource under specified path |
<T> List<T> getChildModels(Class<T> type, String parentPath); | Creates a list of objects of class type and maps it from the resources under specified parent path |
<T> List<T> getChildModels(Class<T> type, Resource parentResource); | Creates a list of objects of class type and maps it from the resources under specified parent resource |
Object get(String className, String path) throws ClassNotFoundException; | Creates an object of a class defined by specified className String and maps it from a resource from under specified path |
Object get(String className, Resource resource) throws ClassNotFoundException; | Creates an object of a class defined by specified className String and maps it from the resource |
<T> List<T> getList(Class<T> type, Iterator<String> paths); | Creates a list of objects of class type and maps them accordingly from resources from under paths defined by paths interator iterator. |
<T> List<T> getList(Class<T> type, String[] paths); | Creates a list of objects of class type and maps them accordingly from resources from under paths defined by paths array. |
<T> List<T> getListFromResources(Class<T> type, Iterator<Resource> resources); | Creates a list of objects of class type and maps it from the resource returned by iterator |
ModelProvider
can be injected to your models, so that you can read a model from an arbitrary resource or path, e.g.:
...