Example usage for Java org.apache.commons.lang3 ClassUtils fields, constructors, methods, implement or subclass
The text is from its open source code.
char | PACKAGE_SEPARATOR_CHAR The package separator character: '.' == . |
String | PACKAGE_SEPARATOR The package separator String: "." . |
String | INNER_CLASS_SEPARATOR The inner class separator String: "$" . |
List | convertClassesToClassNames(final List Given a List of Class objects, this method converts them into class names. A new List is returned. |
List | convertClassNamesToClasses(final List Given a List of class names, this method converts them into classes. A new List is returned. |
String | getAbbreviatedName(final Class> cls, int len) Gets the abbreviated name of a Class . |
String | getAbbreviatedName(String className, int len) Gets the abbreviated class name from a String . The string passed in is assumed to be a class name - it is not checked. The abbreviation algorithm will shorten the class name, usually without significant loss of meaning. The abbreviated class name will always include the complete package hierarchy. |
List | getAllInterfaces(final 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(final Class> cls) Gets a List of superclasses for the given class. |
Class> | getClass(final String className) Returns the (initialized) class represented by className using the current thread's context class loader. |
Class> | getClass(final ClassLoader classLoader, final String className) Returns the (initialized) class represented by className using the classLoader . |
Class> | getClass(final String className, final boolean initialize) Returns the class represented by className using the current thread's context class loader. |
Class> | getClass(final ClassLoader classLoader, final String className, final boolean initialize) Returns the class represented by className using the classLoader . |
String | getPackageCanonicalName(final Class> cls) Gets the package name from the canonical name of a Class . |
String | getPackageCanonicalName(final String canonicalName) Gets the package name from the canonical name. |
String | getPackageName(final Class> cls) Gets the package name of a Class . |
String | getPackageName(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. |
Method | getPublicMethod(final Class> cls, final String methodName, final 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. |
String | getShortCanonicalName(final Class> cls) Gets the canonical name minus the package name from a Class . |
String | getShortCanonicalName(final 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. |
String | getShortClassName(final Class> cls) Gets the class name minus the package name from a Class . Consider using the Java 5 API Class#getSimpleName() instead. |
String | getShortClassName(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. Note that this method differs from Class.getSimpleName() in that this will return "Map.Entry" whilst the java.lang.Class variant will simply return "Entry" . |
String | getShortClassName(final Object object, final String valueIfNull) Gets the class name minus the package name for an Object . |
String | getSimpleName(final Object object, final String valueIfNull) Null-safe version of |
String | getSimpleName(final Class> cls) Null-safe version of |
Iterable | hierarchy(final Class> type, final Interfaces interfacesBehavior) Get an Iterable that can iterate over a class hierarchy in ascending (subclass to superclass) order. |
Iterable | hierarchy(final Class> type) Get an Iterable that can iterate over a class hierarchy in ascending (subclass to superclass) order, excluding interfaces. |
boolean | isAssignable(final Class>[] classArray, final 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. |
boolean | isAssignable(final Class> cls, final 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 null s. Primitive widenings allow an int to be assigned to a long, float or double. |
boolean | isAssignable(Class>[] classArray, Class>[] toClassArray, final 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. |
boolean | isAssignable(Class> cls, final Class> toClass, final 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 null s. Primitive widenings allow an int to be assigned to a long, float or double. |
boolean | isInnerClass(final Class> cls) Is the specified class an inner class or static nested class. |
boolean | isPrimitiveOrWrapper(final Class> type) Returns whether the given type is a primitive or primitive wrapper ( Boolean , Byte , Character , Short , Integer , Long , Double , Float ). |
boolean | isPrimitiveWrapper(final Class> type) Returns whether the given type is a primitive wrapper ( Boolean , Byte , Character , Short , Integer , Long , Double , Float ). |
Class>[] | primitivesToWrappers(final Class>... classes) Converts the specified array of primitive Class objects to an array of its corresponding wrapper Class objects. |
Class> | primitiveToWrapper(final 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(final Object... array) Converts an array of Object in to an array of Class objects. |
Class>[] | wrappersToPrimitives(final Class>... classes) Converts the specified array of wrapper Class objects to an array of its corresponding primitive Class objects. This method invokes wrapperToPrimitive() for each element of the passed in array. |
Class> | wrapperToPrimitive(final Class> cls) Converts the specified wrapper class to its corresponding primitive class. This method is the counter part of primitiveToWrapper() . |