Annotation Interface Child
@Rest(childrenDefs=...) attribute.
Declares a routed child class and lets the host seed a curated set of @Rest-level
settings onto that child's otherwise-isolated RestContext — the child-resource analog of
@Rest(mixinDefs=...). This is the host-side complement to
@Rest(children=...) (which takes bare classes and offers no seed hook).
Example:
Seed semantics
Unlike @Mixin overrides (which win over an inherited chain), children are
isolated from the host's resolution chain by design, so a @Child seed doesn't override
anything — it seeds settings onto an otherwise-isolated child context:
- Additive-security (
guards,converters,roleGuard,rolesDeclared) — the host contributes, the child can't remove or weaken it (list-shaped members prepend; the two role-based members AND-stack alongside the child's own value). - Child-wins scalars (
partSerializer,partParser,defaultCharset,maxInput) — the seed is a default/fallback; the child's own explicit@Restdeclaration wins when present.
A child's own @Rest(noInherit="<property>") cuts the corresponding @Child seed too,
for both buckets above — the child always stays in full control of its own configuration.
There is no noInherit() member on @Child itself (nothing to cut in an isolated context), and
no path()/paths() re-mount member (the child's own @Rest(path) stays authoritative).
See Also:
- Since:
- 10.0.0
-
Required Element Summary
Required Elements -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionClass<? extends RestConverter>[]Host-seededconvertersfor this child's endpoints (prepended before the child's own).Host-seededdefaultCharsetdefault for this child's endpoints.Host-seededguardsfor this child's endpoints (prepended before the child's own).Host-seededmaxInputdefault for this child's endpoints.Class<? extends HttpPartParser>Host-seededpartParserdefault for this child's endpoints.Class<? extends HttpPartSerializer>Host-seededpartSerializerdefault for this child's endpoints.Host-seededroleGuardfor this child's endpoints (AND-stacks with the child's own).Host-seededrolesDeclaredfor this child's endpoints (AND-stacks with the child's own).
-
Element Details
-
type
The child class to route.Required. Equivalent to a bare entry in
Rest.children(), but with the seed slots below.- Returns:
- The child class.
-
-
-
guards
Host-seededguardsfor this child's endpoints (prepended before the child's own).- Returns:
- The annotation value.
- Default:
- {}
-
converters
Class<? extends RestConverter>[] convertersHost-seededconvertersfor this child's endpoints (prepended before the child's own).- Returns:
- The annotation value.
- Default:
- {}
-
roleGuard
Host-seededroleGuardfor this child's endpoints (AND-stacks with the child's own).- Returns:
- The annotation value.
- Default:
- ""
-
rolesDeclared
Host-seededrolesDeclaredfor this child's endpoints (AND-stacks with the child's own).- Returns:
- The annotation value.
- Default:
- ""
-
partSerializer
Class<? extends HttpPartSerializer> partSerializerHost-seededpartSerializerdefault for this child's endpoints.- Returns:
- The annotation value.
- Default:
- org.apache.juneau.marshall.httppart.HttpPartSerializer.Void.class
-
partParser
Class<? extends HttpPartParser> partParserHost-seededpartParserdefault for this child's endpoints.- Returns:
- The annotation value.
- Default:
- org.apache.juneau.marshall.httppart.HttpPartParser.Void.class
-
defaultCharset
Host-seededdefaultCharsetdefault for this child's endpoints.- Returns:
- The annotation value.
- Default:
- ""
-
maxInput
Host-seededmaxInputdefault for this child's endpoints.- Returns:
- The annotation value.
- Default:
- ""
-