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

com.neko233.toolchain.validator.ValidateApi Maven / Gradle / Ivy

package com.neko233.toolchain.validator;

import java.lang.annotation.Annotation;

/**
 * 校验器 API
 *
 * @param        注解
 * @param  字段值类型
 */
public interface ValidateApi {

    /**
     * @return 注解类型
     */
    Class getAnnotationType();

    /**
     * is OK ?
     *
     * @param annotation 注解
     * @param fieldValue 字段的值
     * @return 根据 annotation 返回是否正确
     */
    boolean validateOk(ANNOTATION annotation, FIELD_VALUE_TYPE fieldValue);

    /**
     * 渲染原因模板
     *
     * @param annotation 注解
     * @param fieldName
     * @param fieldValue 字段值
     * @return 原因
     */
    String getReason(ANNOTATION annotation, String fieldName, FIELD_VALUE_TYPE fieldValue);

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy