Package com.jcabi.aspects.aj
Class MethodValidator
- java.lang.Object
-
- com.jcabi.aspects.aj.MethodValidator
-
public final class MethodValidator extends Object
Validates method calls.We do this manual processing of
javax.validation.constraints.*
annotations only because JSR-303 in its current version doesn't support method level validation (see its Appendix C). At the moment we don't support anything expect these two annotations. We think that it's better to wait for JSR-303.The class is thread-safe.
- Since:
- 0.1.10
- See Also:
- Appendix C, How it works
-
-
Constructor Summary
Constructors Constructor Description MethodValidator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
after(org.aspectj.lang.JoinPoint point, Object result)
Validate method response.void
beforeCtor(org.aspectj.lang.JoinPoint point)
Validate arguments of constructor.void
beforeMethod(org.aspectj.lang.JoinPoint point)
Validate arguments of a method.
-
-
-
Method Detail
-
beforeMethod
public void beforeMethod(org.aspectj.lang.JoinPoint point)
Validate arguments of a method.Try NOT to change the signature of this method, in order to keep it backward compatible.
- Parameters:
point
- Join point
-
beforeCtor
public void beforeCtor(org.aspectj.lang.JoinPoint point)
Validate arguments of constructor.Try NOT to change the signature of this method, in order to keep it backward compatible.
- Parameters:
point
- Join point
-
after
public void after(org.aspectj.lang.JoinPoint point, Object result)
Validate method response.Try NOT to change the signature of this method, in order to keep it backward compatible.
- Parameters:
point
- Join pointresult
- Result of the method- Since:
- 0.7.11
-
-