All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.fashionbrot.constraint.ConstraintValidator Maven / Gradle / Ivy

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