Class RestPathAnnotationProcessor

java.lang.Object
io.quarkus.resteasy.deployment.RestPathAnnotationProcessor

public class RestPathAnnotationProcessor extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Pattern
     
    (package private) static final org.jboss.jandex.DotName
     
    (package private) static final org.jboss.jandex.DotName
     
    (package private) static final org.jboss.jandex.DotName
     
    (package private) static final org.jboss.jandex.DotName
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    (package private) void
    findRestPaths(io.quarkus.deployment.builditem.CombinedIndexBuildItem index, io.quarkus.deployment.Capabilities capabilities, Optional<io.quarkus.deployment.metrics.MetricsCapabilityBuildItem> metricsCapability, io.quarkus.deployment.annotations.BuildProducer<AnnotationsTransformerBuildItem> transformers, Optional<io.quarkus.resteasy.server.common.spi.ResteasyJaxrsConfigBuildItem> restApplicationPathBuildItem)
     
    (package private) static Collection<org.jboss.jandex.ClassInfo>
    getAllClassInterfaces(io.quarkus.deployment.builditem.CombinedIndexBuildItem index, Collection<org.jboss.jandex.ClassInfo> classInfos, List<org.jboss.jandex.ClassInfo> resultAcc)
    Recursively get all interfaces given as classInfo collection.
    (package private) static boolean
    isRestEndpointMethod(io.quarkus.deployment.builditem.CombinedIndexBuildItem index, org.jboss.jandex.MethodInfo methodInfo)
     
    (package private) AdditionalBeanBuildItem
    registerBeanClasses(io.quarkus.deployment.Capabilities capabilities, Optional<io.quarkus.deployment.metrics.MetricsCapabilityBuildItem> metricsCapability)
     
    (package private) static Optional<org.jboss.jandex.AnnotationInstance>
    searchPathAnnotationOnInterfaces(io.quarkus.deployment.builditem.CombinedIndexBuildItem index, org.jboss.jandex.MethodInfo methodInfo)
    Searches for the same method as passed in methodInfo parameter in all implemented interfaces and yields an Optional containing the JAX-RS Path annotation.
    (package private) String
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • REST_PATH

      static final org.jboss.jandex.DotName REST_PATH
    • REGISTER_REST_CLIENT

      static final org.jboss.jandex.DotName REGISTER_REST_CLIENT
    • TEMPLATE_PATH

      static final org.jboss.jandex.DotName TEMPLATE_PATH
    • TEMPLATE_PATH_INTERCEPTOR

      static final org.jboss.jandex.DotName TEMPLATE_PATH_INTERCEPTOR
    • MULTIPLE_SLASH_PATTERN

      public static final Pattern MULTIPLE_SLASH_PATTERN
  • Constructor Details

    • RestPathAnnotationProcessor

      public RestPathAnnotationProcessor()
  • Method Details

    • registerBeanClasses

      AdditionalBeanBuildItem registerBeanClasses(io.quarkus.deployment.Capabilities capabilities, Optional<io.quarkus.deployment.metrics.MetricsCapabilityBuildItem> metricsCapability)
    • findRestPaths

      void findRestPaths(io.quarkus.deployment.builditem.CombinedIndexBuildItem index, io.quarkus.deployment.Capabilities capabilities, Optional<io.quarkus.deployment.metrics.MetricsCapabilityBuildItem> metricsCapability, io.quarkus.deployment.annotations.BuildProducer<AnnotationsTransformerBuildItem> transformers, Optional<io.quarkus.resteasy.server.common.spi.ResteasyJaxrsConfigBuildItem> restApplicationPathBuildItem)
    • slashify

      String slashify(String path)
    • searchPathAnnotationOnInterfaces

      static Optional<org.jboss.jandex.AnnotationInstance> searchPathAnnotationOnInterfaces(io.quarkus.deployment.builditem.CombinedIndexBuildItem index, org.jboss.jandex.MethodInfo methodInfo)
      Searches for the same method as passed in methodInfo parameter in all implemented interfaces and yields an Optional containing the JAX-RS Path annotation.
      Parameters:
      index - Jandex-Index for additional lookup
      methodInfo - the method to find
      Returns:
      Optional with the annotation if found. Never null.
    • getAllClassInterfaces

      static Collection<org.jboss.jandex.ClassInfo> getAllClassInterfaces(io.quarkus.deployment.builditem.CombinedIndexBuildItem index, Collection<org.jboss.jandex.ClassInfo> classInfos, List<org.jboss.jandex.ClassInfo> resultAcc)
      Recursively get all interfaces given as classInfo collection.
      Parameters:
      index - Jandex-Index for additional lookup
      classInfos - the class(es) to search. Ends the recursion when empty.
      resultAcc - accumulator for tail-recursion
      Returns:
      Collection of all interfaces und their parents. Never null.
    • isRestEndpointMethod

      static boolean isRestEndpointMethod(io.quarkus.deployment.builditem.CombinedIndexBuildItem index, org.jboss.jandex.MethodInfo methodInfo)