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

com.github.bingoohuang.ibatis.BlackcatUtils Maven / Gradle / Ivy

There is a newer version: 0.0.8
Show newest version
package com.github.bingoohuang.ibatis;

public class BlackcatUtils {
    public static boolean classExists(String className) {
        try {
            Class.forName(className);
            return true;
        } catch (Throwable e) { // including ClassNotFoundException
            return false;
        }
    }


    public static boolean HasBlackcat = classExists(
            "com.github.bingoohuang.blackcat.javaagent.callback.Blackcat");

    public static void log(String msgType, String pattern, Object... args) {
        if (!HasBlackcat) return;

        com.github.bingoohuang.blackcat.javaagent.callback
                .Blackcat.log(msgType, pattern, args);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy