public class ClassUtils extends java.lang.Object
Helper methods for dealing with classes and reflection
Modifiers | Name | Description |
---|---|---|
static java.util.Map<java.lang.Class<?>, java.lang.Class<?>> |
PRIMITIVE_TYPE_COMPATIBLE_CLASSES |
Type Params | Return Type | Name and description |
---|---|---|
|
public static boolean |
getBooleanFromMap(java.lang.String key, java.util.Map<?, ?> map) Retrieves a boolean value from a Map for the given key |
|
public static boolean |
isAssignableOrConvertibleFrom(java.lang.Class<?> clazz, java.lang.Class<?> type) Returns true if the specified clazz parameter is either the same as, or is a superclass or superinterface of, the specified type parameter. |
|
public static boolean |
isClassBelowPackage(java.lang.Class<?> domainClazz, java.util.List packageList) |
|
public static boolean |
isMultiTenant(java.lang.Class clazz) Whether the class is multi tenant |
|
public static boolean |
isPresent(java.lang.String className) Determine whether the java.lang.Class identified by the supplied name is present and can be loaded. |
|
public static boolean |
isPresent(java.lang.String className, java.lang.ClassLoader classLoader) Determine whether the java.lang.Class identified by the supplied name is present and can be loaded. |
|
private static final void |
registerPrimitiveClassPair(java.lang.Class<?> left, java.lang.Class<?> right) Just add two entries to the class compatibility map |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Retrieves a boolean value from a Map for the given key
key
- The key that references the boolean valuemap
- The map to look inReturns true if the specified clazz parameter is either the same as, or is a superclass or superinterface of, the specified type parameter. Converts primitive types to compatible class automatically.
Whether the class is multi tenant
clazz
- The class Determine whether the java.lang.Class identified by the supplied name is present
and can be loaded. Will return false
if either the class or
one of its dependencies is not present or cannot be loaded.
className
- the name of the class to check
(may be null
, which indicates the default class loader) Determine whether the java.lang.Class identified by the supplied name is present
and can be loaded. Will return false
if either the class or
one of its dependencies is not present or cannot be loaded.
className
- the name of the class to checkclassLoader
- the class loader to use
(may be null
, which indicates the default class loader)Just add two entries to the class compatibility map