com.github.fashionbrot.constraint.ConstraintValidator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of validation Show documentation
Show all versions of validation Show documentation
validation 参数验证 https://github.com/fashionbrot/validation
The newest version!
package com.github.fashionbrot.constraint;
import java.lang.annotation.Annotation;
/**
* 自定义注解实现接口,调用顺序 isValid,modify
* @param Annotation
* @param T
*/
public interface ConstraintValidator {
/**
* annotation all
* @param annotation annotation
* @param value value
* @param valueType valueType
* @return boolean
*/
boolean isValid(A annotation, T value,Class> valueType);
/**
* 修改 value 值
* @param annotation annotation
* @param value value
* @param valueType valueType
* @return T
*/
default T modify(A annotation,T value,Class> valueType){
return value;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy