public interface RestResourceResolver extends ResourceResolver
Class objects to instances.
Used to convert classes defined via @Rest(children) into child instances.
Subclasses can be created to provide customized resource resolution. These can be associated with REST resources in one of the following ways:
@Rest(resourceResolver) annotation.
RestContextBuilder.resourceResolver(Class)/RestContextBuilder.resourceResolver(RestResourceResolver)
methods.
| Modifier and Type | Interface and Description |
|---|---|
static interface |
RestResourceResolver.Null
Represents no RestResourceResolver.
|
BASIC, FUZZY| Modifier and Type | Method and Description |
|---|---|
<T> T |
resolve(Object parent,
Class<T> c,
RestContextBuilder builder,
Object... args)
Resolves the specified class to a resource object.
|
resolve<T> T resolve(Object parent, Class<T> c, RestContextBuilder builder, Object... args) throws Exception
Subclasses can override this method to provide their own custom resolution.
The default implementation simply creates a new class instance using Class.newInstance().
parent - The parent resource (i.e. the instance whose class has the @Rest(children) annotation.c - The class to resolve.builder - The initialization configuration for the resource.args - Optional arguments to pass to constructorException - If class could not be resolved.Copyright © 2016–2019 The Apache Software Foundation. All rights reserved.