Modifier and Type | Method and Description |
---|---|
static ClassLoader |
getClassLoader()
Gets the current class loader.
|
static ClassLoader |
getClassLoader(Class<?> theClass)
Gets the class loader of the supplied class.
|
static ClassLoader |
getClassLoader(Object theObject)
Gets the class loader of the supplied object.
|
static CompareField[] |
getCompareFields(Class<?> theClass)
Gets all the possible fields that can be compared upon in the supplied class (and its super classes) plus the fields
that can be reached from the supplied class.
|
static String |
getSimpleClassNameOfInstance(Object object)
Convenience method to get the simple name of the class of the supplied object.
|
static boolean |
isMultipleObjectClass(Class<?> theClass)
Determines whether the supplied class is capable of storing multiple objects or not.
|
static boolean |
isToStringOverridden(Object object)
Determines whether the toString() method of the class of the supplied object has been overridden.
|
static boolean |
isValueClass(Class<?> theClass)
Determines whether the supplied class is a value class or not.
|
public static ClassLoader getClassLoader()
public static ClassLoader getClassLoader(Class<?> theClass)
theClass
- The class to get the class loader for.NullPointerException
- When the supplied class is null.public static ClassLoader getClassLoader(Object theObject)
theObject
- The object to get the class loader for.NullPointerException
- When the supplied object is null.public static String getSimpleClassNameOfInstance(Object object)
object
- The object to determine its simple class name of.NullPointerException
- When the supplied object is null.Class.getSimpleName()
public static boolean isValueClass(Class<?> theClass)
theClass
- The class to check.NullPointerException
- When the supplied theClass is null.public static boolean isMultipleObjectClass(Class<?> theClass)
theClass
- The class to check.NullPointerException
- When the supplied theClass is null.public static CompareField[] getCompareFields(Class<?> theClass)
NotComparable
.
CompareFields
use Methods
to access the actual field, this is why this
method actually accesses the different getters instead of directly accessing the actual fields.theClass
- The class to get the fields from.public static boolean isToStringOverridden(Object object)
object
- The object to check for an overridden toString() at the class level.Copyright © 2008–2018. All rights reserved.