public final class ClassUtils
extends java.lang.Object
| 限定符和类型 | 方法和说明 |
|---|---|
static java.lang.ClassLoader |
getDefaultClassLoader()
Return the default ClassLoader to use: typically the thread context
ClassLoader, if available; the ClassLoader that loaded the ClassUtils
class will be used as fallback.
|
static java.lang.String |
getSimpleName(java.lang.String className)
获取类名
|
static java.lang.Class<?> |
toClassConfident(java.lang.String name)
请仅在确定类存在的情况下调用该方法
|
public static java.lang.String getSimpleName(java.lang.String className)
className - className 全类名public static java.lang.Class<?> toClassConfident(java.lang.String name)
请仅在确定类存在的情况下调用该方法
name - 类名称public static java.lang.ClassLoader getDefaultClassLoader()
Call this method if you intend to use the thread context ClassLoader
in a scenario where you clearly prefer a non-null ClassLoader reference:
for example, for class path resource loading (but not necessarily for
Class.forName, which accepts a null ClassLoader
reference as well).
null if even the system
ClassLoader isn't accessible)Thread.getContextClassLoader(),
ClassLoader.getSystemClassLoader()