Class HttpAnnotationProcessorUtil

java.lang.Object
eu.cloudnetservice.driver.network.http.annotation.parser.HttpAnnotationProcessorUtil

@Internal public final class HttpAnnotationProcessorUtil extends Object
A very small utility class to more easily process annotations added to method parameters.
Since:
4.0
  • Constructor Details

    • HttpAnnotationProcessorUtil

      private HttpAnnotationProcessorUtil()
  • Method Details

    • mapParameters

      Applies each parameter of the given method which is annotated with the given annotation to the given mapper to determine a resolver for a value which should get injected into the parameter when receiving a http request. The mapper can return null to indicate that another processor for the same annotation should handle the request. If no resolver was determined for the parameter, each http call to the route associated with the method will result in an exception as no value for the parameter is present.
      Type Parameters:
      A - the full type of the annotation.
      Parameters:
      method - the http handler method to process.
      annotationType - the raw type of the annotation to handle exclusively.
      mapper - the mapper to determine the value resolver for each parameter of the method.
      Returns:
      a collection of invocation hints which can be added to an incoming http request context.
      Throws:
      NullPointerException - if the given method, annotation type or value resolver mapper is null.