Package org.jboss.resteasy.spi.metadata

## Class ResourceBuilder

- java.lang.Object
- - org.jboss.resteasy.spi.metadata.ResourceBuilder

-     public class ResourceBuilder
      extends Object

  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | 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 Summary

    Constructors
    Constructor | Description
    --- | ---
    `ResourceBuilder()` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method | 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.
    `protected ResourceBuilder.ResourceClassBuilder` | `createResourceClassBuilder​(Class<?> clazz)` |
    `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.
    `Class<? extends Annotation>` | `getCorrespondingRootAnnotation()` |
    `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.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ResourceBuilder

          public ResourceBuilder()

  - ### Method Detail

    - #### registerResourceClassProcessor

          public void registerResourceClassProcessor​(ResourceClassProcessor processor,
                                                     int priority)

      Register a new `ResourceClassProcessor` which will be used to post-process all `ResourceClass` instances created from the builder.
      Parameters:
        `processor` - resource class processor
        `priority` - processor priority

    - #### rootResource

          @Deprecated
          public static ResourceBuilder.ResourceClassBuilder rootResource​(Class<?> root)

      Deprecated.

    - #### buildRootResource

          public ResourceBuilder.ResourceClassBuilder buildRootResource​(Class<?> root)

    - #### rootResource

          @Deprecated
          public static ResourceBuilder.ResourceClassBuilder rootResource​(Class<?> root,
                                                                          String path)

      Deprecated.

    - #### buildRootResource

          protected ResourceBuilder.ResourceClassBuilder buildRootResource​(Class<?> root,
                                                                           String path)

    - #### locator

          @Deprecated
          public static ResourceBuilder.ResourceClassBuilder locator​(Class<?> root)

      Deprecated.

    - #### buildLocator

          protected ResourceBuilder.ResourceClassBuilder buildLocator​(Class<?> root)

    - #### constructor

          @Deprecated
          public static ResourceConstructor constructor​(Class<?> annotatedResourceClass)

      Deprecated.

    - #### getCorrespondingRootAnnotation

          public Class<? extends Annotation> getCorrespondingRootAnnotation()

    - #### getConstructor

          public ResourceConstructor getConstructor​(Class<?> annotatedResourceClass)

      Picks a constructor from an annotated resource class based on spec rules.
      Parameters:
        `annotatedResourceClass` - annotated resource class
      Returns:
        `ResourceConstructor`

    - #### rootResourceFromAnnotations

          @Deprecated
          public static ResourceClass rootResourceFromAnnotations​(Class<?> clazz)

      Deprecated.

    - #### getRootResourceFromAnnotations

          public ResourceClass getRootResourceFromAnnotations​(Class<?> clazz)

      Build metadata from annotations on classes and methods.
      Parameters:
        `clazz` - class
      Returns:
        resource class

    - #### locatorFromAnnotations

          @Deprecated
          public static ResourceClass locatorFromAnnotations​(Class<?> clazz)

      Deprecated.

    - #### getLocatorFromAnnotations

          public ResourceClass getLocatorFromAnnotations​(Class<?> clazz)

    - #### createResourceClassBuilder

          protected ResourceBuilder.ResourceClassBuilder createResourceClassBuilder​(Class<?> clazz)

    - #### findAnnotatedMethod

          @Deprecated
          public static Method findAnnotatedMethod​(Class<?> root,
                                                   Method implementation)

      Deprecated.

    - #### getAnnotatedMethod

          public Method getAnnotatedMethod​(Class<?> root,
                                           Method implementation)

      Find the annotated resource method or sub-resource method / sub-resource locator in the class hierarchy.
      Parameters:
        `root` - The root resource class.
        `implementation` - The resource method or sub-resource method / sub-resource locator implementation
      Returns:
        The annotated resource method or sub-resource method / sub-resource locator.

    - #### processFields

          protected void processFields​(ResourceBuilder.ResourceClassBuilder resourceClassBuilder,
                                       Class<?> root)

    - #### processSetters

          protected void processSetters​(ResourceBuilder.ResourceClassBuilder resourceClassBuilder,
                                        Class<?> root)

    - #### processDeclaredFields

          protected void processDeclaredFields​(ResourceBuilder.ResourceClassBuilder resourceClassBuilder,
                                               Class<?> root)

    - #### processDeclaredSetters

          protected void processDeclaredSetters​(ResourceBuilder.ResourceClassBuilder resourceClassBuilder,
                                                Class<?> root,
                                                Set<Long> visitedHashes)

    - #### processMethod

          protected void processMethod​(boolean isLocator,
                                       ResourceBuilder.ResourceClassBuilder resourceClassBuilder,
                                       Class<?> root,
                                       Method implementation)