public class SpringRestResourceResolver extends BasicRestResourceResolver
RestResourceResolver
for resolving resource classes using Spring.
Used for resolving resource classes defined via Rest.children()
.
A typical usage pattern for registering a Juneau REST resource class is shown below:
RestResourceResolver.Null
BASIC, FUZZY
Constructor and Description |
---|
SpringRestResourceResolver(org.springframework.context.ApplicationContext ctx)
Constructor.
|
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
resolve
public SpringRestResourceResolver(org.springframework.context.ApplicationContext ctx)
ctx
- The spring application context object.public <T> T resolve(Object parent, Class<T> c, RestContextBuilder builder, Object... args)
RestResourceResolver
Subclasses can override this method to provide their own custom resolution.
The default implementation simply creates a new class instance using Class.newInstance()
.
resolve
in interface RestResourceResolver
resolve
in class BasicRestResourceResolver
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 constructorCopyright © 2016–2019 The Apache Software Foundation. All rights reserved.