Annotation Inheritance

The {@link oajr.annotation.Rest @Rest} annotation can also be used on parents and interfaces of resource classes. When multiple annotations are defined at different levels, the annotation values are combined.

This is a particularly useful feature because it allows you to define your own configured parent resource classes that can be extended by all your child resources so that they all share common settings.

Inheritance rules
Annotation Inheritence Rules
{@link oajr.annotation.Rest#guards() guards()} Guards on child are combined with those on parent class.
Guards are executed child-to-parent in the order they appear in the annotation.
Guards on methods are executed before those on classes.
{@link oajr.annotation.Rest#converters() converters()} Converters on child are combined with those on parent class.
Converters are executed child-to-parent in the order they appear in the annotation.
Converters on methods are executed before those on classes.
{@link oajr.annotation.Rest#properties() properties()} Properties on child are combined with those on parent class.
Properties are applied parent-to-child in the order they appear in the annotation.
Properties on methods take precedence over those on classes.
{@link oajr.annotation.Rest#serializers() serializers()} Serializers on child override those on parent class.
{@link oajr.Inherit} class can be used to inherit and augment values from parent.
{@link oajr.None} class can be used to suppress inheriting from parent.
Serializers on methods take precedence over those on classes.
{@link oajr.annotation.Rest#parsers() parsers()} Parsers on child override those on parent class.
{@link oajr.Inherit} class can be used to inherit and augment values from parent.
{@link oajr.None} class can be used to suppress inheriting from parent.
Parsers on methods take precedence over those on classes.
{@link oajr.annotation.Rest#responseHandlers() responseHandlers()} Response handlers on child are combined with those on parent class.
{@link oajr.annotation.Rest#encoders() encoders()} Encoders on child are combined with those on parent class.
{@link oajr.annotation.Rest#reqHeaders() reqHeaders()} Headers on child are combined with those on parent class.
Headers are applied parent-to-child in the order they appear in the annotation.
Headers on methods take precedence over those on classes.
{@link oajr.annotation.Rest#resHeaders() resHeaders()} Headers on child are combined with those on parent class.
Headers are applied parent-to-child in the order they appear in the annotation.
{@link oajr.annotation.Rest#children() children()} Children on child are combined with those on parent class.
Children are list parent-to-child in the order they appear in the annotation.
{@link oajr.annotation.Rest#path() path()} Path is searched for in child-to-parent order.
{@link oajr.annotation.Rest#title() title()} Label is searched for in child-to-parent order.
{@link oajr.annotation.Rest#description() description()} Description is searched for in child-to-parent order.
{@link oajr.annotation.Rest#config() config()} Config file is searched for in child-to-parent order.
{@link oajr.annotation.Rest#staticFiles() staticFiles()} Static files on child are combined with those on parent class.
Static files are are executed child-to-parent in the order they appear in the annotation.