...
The @SliceResource
annotation is used to inform Slice that such a class should be mapped from current resource by built-in object-resource Mapper. An example class looks like this:
...
ModelProvider
(described in details at ModelProvider) is a core interface in Slice and is used for providing objects (models). Its functionality is very similar to injector's getInstance()
; however it is extended by a resource, so that object fields can be mapped using specified resource (or path). A simple use of ModelProvider
:
...