Java Code Examples for io.micronaut.core.reflect.ClassUtils#isPresent()

The following examples show how to use io.micronaut.core.reflect.ClassUtils#isPresent() . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: micronaut-sql   File: JdbiFactory.java    License: Apache License 2.0 4 votes vote down vote up
private boolean h2IsPresent() {
    return ClassUtils.isPresent("org.h2.Driver", this.getClass().getClassLoader());
}
 
Example 2
@Override
public boolean matches(ConditionContext context) {
    BeanContext beanContext = context.getBeanContext();
    return !ClassUtils.isPresent("io.micronaut.configuration.hibernate.jpa.HibernateTransactionManagerFactory", beanContext.getClassLoader());
}
 
Example 3
private boolean driverClassIsPresent(String className) {
    return ClassUtils.isPresent(className, this.getClass().getClassLoader());
}
 
Example 4
/**
 * @param requiredTestClass The test class
 * @return true if the te given class has a bean definition class in the classpath (ie: the annotation processor has been run correctly)
 */
protected boolean isTestSuiteBeanPresent(Class<?> requiredTestClass) {
    return ClassUtils.isPresent(requiredTestClass.getPackage().getName() + ".$" + requiredTestClass.getSimpleName() + "Definition", requiredTestClass.getClassLoader());
}