Package io.quarkus.spring.web.deployment
Class ControllerAdviceExceptionMapperGenerator
java.lang.Object
io.quarkus.spring.web.deployment.AbstractExceptionMapperGenerator
io.quarkus.spring.web.deployment.ControllerAdviceExceptionMapperGenerator
-
Field Summary
Fields inherited from class io.quarkus.spring.web.deployment.AbstractExceptionMapperGenerator
classOutput, exceptionDotName, RESPONSE_STATUS -
Constructor Summary
ConstructorsConstructorDescriptionControllerAdviceExceptionMapperGenerator(org.jboss.jandex.MethodInfo controllerAdviceMethod, org.jboss.jandex.DotName exceptionDotName, io.quarkus.gizmo.ClassOutput classOutput, TypesUtil typesUtil, boolean isResteasyClassic) -
Method Summary
Modifier and TypeMethodDescription(package private) voidgenerateMethodBody(io.quarkus.gizmo.MethodCreator toResponse) protected voidpreGenerateMethodBody(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 methodMethods inherited from class io.quarkus.spring.web.deployment.AbstractExceptionMapperGenerator
generate, getHttpStatusFromAnnotation
-
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:
preGenerateMethodBodyin classAbstractExceptionMapperGenerator
-
generateMethodBody
void generateMethodBody(io.quarkus.gizmo.MethodCreator toResponse) - Specified by:
generateMethodBodyin classAbstractExceptionMapperGenerator
-