Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

If you want a resource to be mapped to an Java object, you have to meet to three requirements:

  • class must be annotated with @SliceResource,
  • object must be created using injector. All classes annotated with @SliceResource are bound to SliceResourceProvider which is responsible for reading a current resource and invoking mapping to an object. Usually, you will be using ModelProvider to specify from which resource to map,
  • class cannot be nested.

You don't need to invoke anything by yourself, if an object is injected and annotated with @SliceResource it will be automatically mapped from current resource.

...