
com.linecorp.kotlinjdsl.clazz.ClassUtils.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kotlin-jdsl Show documentation
Show all versions of kotlin-jdsl Show documentation
Kotlin library that makes it easy to build and execute queries without generated metamodel.
package com.linecorp.kotlinjdsl.clazz
object ClassUtils {
fun isPresent(className: String, classLoader: ClassLoader? = null): Boolean {
val result = runCatching {
if (classLoader != null) {
Class.forName(className, false, classLoader)
} else {
Class.forName(className)
}
}
return result.map { true }.getOrElse { false }
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy