Class AbstractRestBuilder<R,SELF extends AbstractRestBuilder<R,SELF>>

java.lang.Object
org.apache.juneau.rest.server.AbstractRestBuilder<R,SELF>
Type Parameters:
R - The resource type produced by build().
SELF - The concrete builder type (self type).
All Implemented Interfaces:
RestBuilder<SELF>
Direct Known Subclasses:
RestMixin.Builder, RestResource.Builder, RestServlet.Builder

public abstract class AbstractRestBuilder<R,SELF extends AbstractRestBuilder<R,SELF>> extends Object implements RestBuilder<SELF>
Shared abstract base for the RestBuilder flavor builders (RestServlet.Builder, RestResource.Builder, RestMixin.Builder).

Each fluent @Rest-member setter is implemented once here and forwards into a backing RestAnnotation.Builder — the override bag. At RestContext construction time the bag is turned into a synthetic, highest-priority @Rest annotation that is prepended to the resource's @Rest chain, so builder-supplied values take precedence over the class's own @Rest annotation values.

Self type (CRTP):

SELF is the concrete builder type, left open through the flavor builders and their user subclasses so that bespoke setters on a subclass chain with true covariant returns. Setters return self().

Since:
10.0.0