Annotation Type EndpointExtension


  • @Target(TYPE)
    @Retention(RUNTIME)
    @Documented
    public @interface EndpointExtension
    Annotation primarily used as a meta-annotation to indicate that an annotation provides extension support for an endpoint. Extensions allow additional technology specific operations to be added to an existing endpoint. For example, a web extension may offer variations of a read operation to support filtering based on a query parameter.

    Extension annotations must provide an EndpointFilter to restrict when the extension applies. The endpoint attribute is usually re-declared using @AliasFor. For example:

     @EndpointExtension(filter = WebEndpointFilter.class)
     public @interface EndpointWebExtension {
    
       @AliasFor(annotation = EndpointExtension.class, attribute = "endpoint")
       Class<?> endpoint();
    
     }
     
    Since:
    2.0.0
    • Required Element Summary

      Required Elements 
      Modifier and TypeRequired ElementDescription
      Class<? extends EndpointFilter<?>>filter
      The filter class used to determine when the extension applies.
    • Optional Element Summary

      Optional Elements 
      Modifier and TypeOptional ElementDescription
      Class<?>endpoint
      The class of the endpoint to extend.
    • Element Detail

      • filter

        Class<? extends EndpointFilter<?>> filter
        The filter class used to determine when the extension applies.
        Returns:
        the filter class
      • endpoint

        Class<?> endpoint
        The class of the endpoint to extend.
        Returns:
        the class endpoint to extend
        Default:
        java.lang.Void.class