Java org.apache.commons.lang ClassUtils fields, constructors, methods, implement or subclass

Example usage for Java org.apache.commons.lang ClassUtils fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.apache.commons.lang ClassUtils.

The text is from its open source code.

Subclass

org.apache.commons.lang.ClassUtils has subclasses.
Click this link to see all its subclasses.

Field

charINNER_CLASS_SEPARATOR_CHAR

The inner class separator character: '$' == .

StringINNER_CLASS_SEPARATOR

The inner class separator String: "$".

Method

ListconvertClassesToClassNames(List> classes)

Given a List of Class objects, this method converts them into class names.

A new List is returned.

List>convertClassNamesToClasses(List classNames)

Given a List of class names, this method converts them into classes.

A new List is returned.

List>getAllInterfaces(Class cls)

Gets a List of all interfaces implemented by the given class and its superclasses.

The order is determined by looking through each interface in turn as declared in the source file and following its hierarchy up.

List>getAllSuperclasses(Class cls)

Gets a List of superclasses for the given class.

ClassgetClass(String className)
Returns the (initialized) class represented by className using the current thread's context class loader.
ClassgetClass(ClassLoader classLoader, String className)
Returns the (initialized) class represented by className using the classLoader.
ClassgetClass(String className, boolean initialize)
Returns the class represented by className using the current thread's context class loader.
ClassgetClass(ClassLoader classLoader, String className, boolean initialize)
Returns the class represented by className using the classLoader.
StringgetPackageName(Object object, String valueIfNull)

Gets the package name of an Object.

StringgetPackageName(Class cls)

Gets the package name of a Class.

StringgetPackageName(String className)

Gets the package name from a String.

The string passed in is assumed to be a class name - it is not checked.

If the class is unpackaged, return an empty string.

MethodgetPublicMethod(Class cls, String methodName, Class parameterTypes[])

Returns the desired Method much like Class.getMethod, however it ensures that the returned Method is from a public class or interface and not from an anonymous inner class.

StringgetShortCanonicalName(Class cls)

Gets the canonical name minus the package name from a Class.

StringgetShortCanonicalName(String canonicalName)

Gets the canonical name minus the package name from a String.

The string passed in is assumed to be a canonical name - it is not checked.

StringgetShortCanonicalName(Object object, String valueIfNull)

Gets the canonical name minus the package name for an Object.

StringgetShortClassName(Class cls)

Gets the class name minus the package name from a Class.

StringgetShortClassName(String className)

Gets the class name minus the package name from a String.

The string passed in is assumed to be a class name - it is not checked.

StringgetShortClassName(Object object, String valueIfNull)

Gets the class name minus the package name for an Object.

booleanisAssignable(Class[] classArray, Class[] toClassArray)

Checks if an array of Classes can be assigned to another array of Classes.

This method calls #isAssignable(Class,Class) isAssignable for each Class pair in the input arrays.

booleanisAssignable(Class cls, Class toClass)

Checks if one Class can be assigned to a variable of another Class.

Unlike the Class#isAssignableFrom(java.lang.Class) method, this method takes into account widenings of primitive classes and nulls.

Primitive widenings allow an int to be assigned to a long, float or double.

booleanisAssignable(Class[] classArray, Class[] toClassArray, boolean autoboxing)

Checks if an array of Classes can be assigned to another array of Classes.

This method calls #isAssignable(Class,Class) isAssignable for each Class pair in the input arrays.

booleanisAssignable(Class cls, Class toClass, boolean autoboxing)

Checks if one Class can be assigned to a variable of another Class.

Unlike the Class#isAssignableFrom(java.lang.Class) method, this method takes into account widenings of primitive classes and nulls.

Primitive widenings allow an int to be assigned to a long, float or double.

ClassprimitiveToWrapper(Class cls)

Converts the specified primitive Class object to its corresponding wrapper Class object.

NOTE: From v2.2, this method handles Void.TYPE, returning Void.TYPE.

Class[]toClass(Object[] array)

Converts an array of Object in to an array of Class objects.

This method returns null for a null input array.

ClasswrapperToPrimitive(Class cls)

Converts the specified wrapper class to its corresponding primitive class.

This method is the counter part of primitiveToWrapper().