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

com.github.bingoohuang.springrestclient.utils.AsmValidatorLog Maven / Gradle / Ivy

There is a newer version: 0.0.23
Show newest version
package com.github.bingoohuang.springrestclient.utils;

import com.github.bingoohuang.asmvalidator.AsmParamsValidatorFactory;
import com.github.bingoohuang.asmvalidator.ex.AsmValidateException;
import lombok.experimental.UtilityClass;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@UtilityClass
public class AsmValidatorLog {
    public void validate(
        Class apiClass,
        String methodSignature,
        Object... parametersValues
    ) {
        try {
            AsmParamsValidatorFactory.validate(methodSignature, parametersValues);
        } catch (AsmValidateException e) {
            Logger log = LoggerFactory.getLogger(apiClass);
            log.warn("validate failed {}", e.getMessage());
            throw e;
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy