org.jboss.dna.common.util
Class ClassUtil
java.lang.Object
org.jboss.dna.common.util.ClassUtil
public final class ClassUtil
- extends java.lang.Object
Static utilities for working with classes.
- Author:
- John Verhaeg
Method Summary |
static boolean |
isFullyQualifiedClassname(java.lang.String classname)
Determine whether the supplied string represents a well-formed fully-qualified Java classname. |
static void |
makeAccessible(java.lang.reflect.AccessibleObject object)
|
static java.lang.String |
nonPackageQualifiedName(java.lang.Class clazz)
|
static java.lang.String |
nonPackageQualifiedName(java.lang.Object object)
|
static java.lang.String |
toString(java.lang.Object object,
int includeInheritedFieldDepth)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
makeAccessible
public static void makeAccessible(java.lang.reflect.AccessibleObject object)
- Parameters:
object
-
nonPackageQualifiedName
public static java.lang.String nonPackageQualifiedName(java.lang.Class clazz)
- Parameters:
clazz
- A class.
- Returns:
- The non-package-qualified name of the specified class. Note, inner class names will still be qualified by their
enclosing class names and a "$" delimiter.
nonPackageQualifiedName
public static java.lang.String nonPackageQualifiedName(java.lang.Object object)
- Parameters:
object
- An object.
- Returns:
- The non-package-qualified name of the class of the specified object. Note, inner class names will still be
qualified by their enclosing class names and a "$" delimiter.
toString
public static java.lang.String toString(java.lang.Object object,
int includeInheritedFieldDepth)
- Parameters:
object
- includeInheritedFieldDepth
-
- Returns:
- A string representation of the specified object, consisting of its class name, properties, and property values.
isFullyQualifiedClassname
public static boolean isFullyQualifiedClassname(java.lang.String classname)
- Determine whether the supplied string represents a well-formed fully-qualified Java classname. This utility method enforces
no conventions (e.g., packages are all lowercase) nor checks whether the class is available on the classpath.
- Parameters:
classname
-
- Returns:
- true if the string is a fully-qualified class name
Copyright © 2008. All Rights Reserved.