Package io.micronaut.validation
Class ValidatingInterceptor
java.lang.Object
io.micronaut.validation.ValidatingInterceptor
- All Implemented Interfaces:
io.micronaut.aop.Interceptor<Object,
,Object> io.micronaut.aop.MethodInterceptor<Object,
,Object> io.micronaut.core.order.Ordered
@Singleton
public class ValidatingInterceptor
extends Object
implements io.micronaut.aop.MethodInterceptor<Object,Object>
A
MethodInterceptor
that validates method invocations.- Since:
- 1.0
- Author:
- Graeme Rocher
-
Field Summary
Fields inherited from interface io.micronaut.aop.Interceptor
ARGUMENT, CACHEABLE_LAZY_TARGET, HOTSWAP, LAZY, PROXY_TARGET
Fields inherited from interface io.micronaut.core.order.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Constructor Summary
ConstructorDescriptionValidatingInterceptor
(@Nullable Validator micronautValidator, @Nullable jakarta.validation.ValidatorFactory validatorFactory, io.micronaut.core.convert.ConversionService conversionService) Creates ValidatingInterceptor from the validatorFactory. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.micronaut.aop.MethodInterceptor
intercept
-
Field Details
-
POSITION
public static final int POSITIONThe position of the interceptor. SeeOrdered
-
-
Constructor Details
-
ValidatingInterceptor
public ValidatingInterceptor(@Nullable @Nullable Validator micronautValidator, @Nullable @Nullable jakarta.validation.ValidatorFactory validatorFactory, io.micronaut.core.convert.ConversionService conversionService) Creates ValidatingInterceptor from the validatorFactory.- Parameters:
micronautValidator
- The micronaut validator use if no factory is availablevalidatorFactory
- Factory returning initializedValidator
instancesconversionService
- The conversion service
-
-
Method Details
-
getOrder
public int getOrder()- Specified by:
getOrder
in interfaceio.micronaut.core.order.Ordered
-
intercept
-