public class ResourceBuilder extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ResourceBuilder.ConstructorParameterBuilder |
static class |
ResourceBuilder.FieldParameterBuilder |
static class |
ResourceBuilder.LocatorMethodParameterBuilder<T extends ResourceBuilder.LocatorMethodParameterBuilder<T>> |
static class |
ResourceBuilder.ParameterBuilder<T extends ResourceBuilder.ParameterBuilder<T>> |
static class |
ResourceBuilder.ResourceClassBuilder |
static class |
ResourceBuilder.ResourceConstructorBuilder |
static class |
ResourceBuilder.ResourceLocatorBuilder<T extends ResourceBuilder.ResourceLocatorBuilder<T>> |
static class |
ResourceBuilder.ResourceMethodBuilder |
static class |
ResourceBuilder.ResourceMethodParameterBuilder |
static class |
ResourceBuilder.SetterParameterBuilder |
Constructor and Description |
---|
ResourceBuilder() |
Modifier and Type | Method and Description |
---|---|
protected ResourceBuilder.ResourceClassBuilder |
buildLocator(Class<?> root) |
ResourceBuilder.ResourceClassBuilder |
buildRootResource(Class<?> root) |
protected ResourceBuilder.ResourceClassBuilder |
buildRootResource(Class<?> root,
String path) |
static ResourceConstructor |
constructor(Class<?> annotatedResourceClass)
Deprecated.
|
static Method |
findAnnotatedMethod(Class<?> root,
Method implementation)
Deprecated.
|
Method |
getAnnotatedMethod(Class<?> root,
Method implementation)
Find the annotated resource method or sub-resource method / sub-resource locator in the class hierarchy.
|
ResourceConstructor |
getConstructor(Class<?> annotatedResourceClass)
Picks a constructor from an annotated resource class based on spec rules.
|
ResourceClass |
getLocatorFromAnnotations(Class<?> clazz) |
ResourceClass |
getRootResourceFromAnnotations(Class<?> clazz)
Build metadata from annotations on classes and methods.
|
static ResourceBuilder.ResourceClassBuilder |
locator(Class<?> root)
Deprecated.
|
static ResourceClass |
locatorFromAnnotations(Class<?> clazz)
Deprecated.
|
protected void |
processDeclaredFields(ResourceBuilder.ResourceClassBuilder resourceClassBuilder,
Class<?> root) |
protected void |
processDeclaredSetters(ResourceBuilder.ResourceClassBuilder resourceClassBuilder,
Class<?> root,
Set<Long> visitedHashes) |
protected void |
processFields(ResourceBuilder.ResourceClassBuilder resourceClassBuilder,
Class<?> root) |
protected void |
processMethod(boolean isLocator,
ResourceBuilder.ResourceClassBuilder resourceClassBuilder,
Class<?> root,
Method implementation) |
protected void |
processSetters(ResourceBuilder.ResourceClassBuilder resourceClassBuilder,
Class<?> root) |
void |
registerResourceClassProcessor(ResourceClassProcessor processor,
int priority)
Register a new
ResourceClassProcessor which will be used to post-process all
ResourceClass instances created from the builder. |
static ResourceBuilder.ResourceClassBuilder |
rootResource(Class<?> root)
Deprecated.
|
static ResourceBuilder.ResourceClassBuilder |
rootResource(Class<?> root,
String path)
Deprecated.
|
static ResourceClass |
rootResourceFromAnnotations(Class<?> clazz)
Deprecated.
|
public void registerResourceClassProcessor(ResourceClassProcessor processor, int priority)
ResourceClassProcessor
which will be used to post-process all
ResourceClass
instances created from the builder.processor
- resource class processorpriority
- processor priority@Deprecated public static ResourceBuilder.ResourceClassBuilder rootResource(Class<?> root)
public ResourceBuilder.ResourceClassBuilder buildRootResource(Class<?> root)
@Deprecated public static ResourceBuilder.ResourceClassBuilder rootResource(Class<?> root, String path)
protected ResourceBuilder.ResourceClassBuilder buildRootResource(Class<?> root, String path)
@Deprecated public static ResourceBuilder.ResourceClassBuilder locator(Class<?> root)
protected ResourceBuilder.ResourceClassBuilder buildLocator(Class<?> root)
@Deprecated public static ResourceConstructor constructor(Class<?> annotatedResourceClass)
public ResourceConstructor getConstructor(Class<?> annotatedResourceClass)
annotatedResourceClass
- annotated resource classResourceConstructor
@Deprecated public static ResourceClass rootResourceFromAnnotations(Class<?> clazz)
public ResourceClass getRootResourceFromAnnotations(Class<?> clazz)
clazz
- class@Deprecated public static ResourceClass locatorFromAnnotations(Class<?> clazz)
public ResourceClass getLocatorFromAnnotations(Class<?> clazz)
@Deprecated public static Method findAnnotatedMethod(Class<?> root, Method implementation)
public Method getAnnotatedMethod(Class<?> root, Method implementation)
root
- The root resource class.implementation
- The resource method or sub-resource method / sub-resource locator implementationprotected void processFields(ResourceBuilder.ResourceClassBuilder resourceClassBuilder, Class<?> root)
protected void processSetters(ResourceBuilder.ResourceClassBuilder resourceClassBuilder, Class<?> root)
protected void processDeclaredFields(ResourceBuilder.ResourceClassBuilder resourceClassBuilder, Class<?> root)
protected void processDeclaredSetters(ResourceBuilder.ResourceClassBuilder resourceClassBuilder, Class<?> root, Set<Long> visitedHashes)
protected void processMethod(boolean isLocator, ResourceBuilder.ResourceClassBuilder resourceClassBuilder, Class<?> root, Method implementation)
Copyright © 2021 JBoss by Red Hat. All rights reserved.