public class ClassUtilities extends Object
Constructor and Description |
---|
ClassUtilities() |
Modifier and Type | Method and Description |
---|---|
static boolean |
areAllConstructorsPrivate(Class<?> c) |
static int |
computeInheritanceDistance(Class<?> source,
Class<?> destination)
Computes the inheritance distance between two classes/interfaces/primitive types.
|
static Class<?> |
forName(String name,
ClassLoader classLoader)
Given the passed in String class name, return the named JVM class.
|
static boolean |
isClassFinal(Class<?> c) |
static boolean |
isPrimitive(Class<?> c) |
static Class<?> |
toPrimitiveWrapperClass(Class<?> primitiveClass) |
public static int computeInheritanceDistance(Class<?> source, Class<?> destination)
source
- The source class, interface, or primitive type.destination
- The destination class, interface, or primitive type.public static boolean isPrimitive(Class<?> c)
c
- Class to testpublic static Class<?> forName(String name, ClassLoader classLoader)
name
- String name of a JVM class.classLoader
- ClassLoader to use when searching for JVM classes.public static boolean isClassFinal(Class<?> c)
public static boolean areAllConstructorsPrivate(Class<?> c)
Copyright © 2024. All rights reserved.