Annotation Interface ResourceTemplateArg


@Target(PARAMETER) @Retention(RUNTIME) @Documented public @interface ResourceTemplateArg
Configures a parameter of a ResourceTemplate method.

This annotation allows you to customize the name of parameters that correspond to URI template variables in resource templates.

See Also:
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The name of the URI template variable.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Constant value for name() indicating that the annotated element's name should be used as-is.
  • Field Details

    • ELEMENT_NAME

      static final String ELEMENT_NAME
      Constant value for name() indicating that the annotated element's name should be used as-is.
      See Also:
  • Element Details

    • name

      String name
      The name of the URI template variable.

      Each argument to a resource template must have a unique name and must match one of the variables included in the uriTemplate.

      By default, the parameter name from the method signature will be used (requires compilation with the -parameters flag).

      Returns:
      the template variable name
      Default:
      "<<element name>>"