org.jboss.dna.common.util
Class ClassUtil

java.lang.Object
  extended by org.jboss.dna.common.util.ClassUtil

@Immutable
public final class ClassUtil
extends Object

Static utilities for working with classes.


Method Summary
static boolean isFullyQualifiedClassname(String classname)
          Determine whether the supplied string represents a well-formed fully-qualified Java classname.
static void makeAccessible(AccessibleObject object)
           
static String nonPackageQualifiedName(Class<?> clazz)
           
static String nonPackageQualifiedName(Object object)
           
static String toString(Object object, int includeInheritedFieldDepth)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

makeAccessible

public static void makeAccessible(AccessibleObject object)
Parameters:
object -

nonPackageQualifiedName

public static String nonPackageQualifiedName(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 String nonPackageQualifiedName(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 String toString(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(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-2009 JBoss, a division of Red Hat. All Rights Reserved.