Class ControllerAdviceExceptionMapperGenerator

java.lang.Object
io.quarkus.spring.web.deployment.AbstractExceptionMapperGenerator
io.quarkus.spring.web.deployment.ControllerAdviceExceptionMapperGenerator

class ControllerAdviceExceptionMapperGenerator extends AbstractExceptionMapperGenerator
  • Constructor Details

    • ControllerAdviceExceptionMapperGenerator

      ControllerAdviceExceptionMapperGenerator(org.jboss.jandex.MethodInfo controllerAdviceMethod, org.jboss.jandex.DotName exceptionDotName, io.quarkus.gizmo.ClassOutput classOutput, TypesUtil typesUtil, boolean isResteasyClassic)
  • Method Details

    • preGenerateMethodBody

      protected void preGenerateMethodBody(io.quarkus.gizmo.ClassCreator cc)
      We need to go through each parameter of the method of the ControllerAdvice and make sure it's supported The jakarta.ws.rs.ext.ExceptionMapper only has one parameter, the exception, however other parameters can be obtained using @Context and therefore injected into the target method
      Overrides:
      preGenerateMethodBody in class AbstractExceptionMapperGenerator
    • generateMethodBody

      void generateMethodBody(io.quarkus.gizmo.MethodCreator toResponse)
      Specified by:
      generateMethodBody in class AbstractExceptionMapperGenerator