Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.modeshape.common.util
Class ClassUtil

    java.lang.Object
      org.modeshape.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 Class<?>` | `loadClassStrict(String classname)` Loads the class using either the current thread's context class loader or, if that is null, the system class loader.
`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
`clone, equals, finalize, 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

### loadClassStrict

    public static Class<?> loadClassStrict(String classname)
                                    throws ClassNotFoundException

  Loads the class using either the current thread's context class loader or, if that is null, the system class loader.

  Parameters:
    `classname` - name of the class to load
  Returns:
    the class
  Throws:
    `ClassNotFoundException` - if the class could not be found

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008-2011 JBoss, a division of Red Hat. All Rights Reserved.