org.sql2o.tools.ClassUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of anima Show documentation
Show all versions of anima Show documentation
Operate the database like a stream
package org.sql2o.tools;
/**
* @author Alden Quimby
*/
public final class ClassUtils {
// private static ClassLoader getClassLoader() {
// return Thread.currentThread().getContextClassLoader();
// }
/**
* Check whether the {@link Class} identified by the supplied name is present.
*
* @param className the name of the class to check
* @return true if class is present, false otherwise
*/
public static boolean isPresent(String className) {
try {
// what's wrong with old plain Class.forName
// this code supposed to work everywhere including containers
Class.forName(className);
// getClassLoader().loadClass(className);
return true;
}
catch (Throwable ex) {
return false;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy