public final class ClassUtils extends Object
org.springframework.util.ClassUtils in version 5.1.3:
| Modifier and Type | Method and Description |
|---|---|
static 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 boolean |
isEnum(Class<?> clazz)
See https://github.com/neo4j/neo4j-ogm/issues/643.
|
static boolean |
isEnum(Object object) |
public static 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()public static boolean isEnum(Class<?> clazz)
Class.isEnum() returns false.clazz - The class to check whether it is an enum or not.clazz is an enum.public static boolean isEnum(Object object)
object - isEnum(Class)Copyright © 2015–2019 Neo Technology, Inc.. All rights reserved.