com.quartzdesk.api
Class ApiDebug

java.lang.Object
  extended by com.quartzdesk.api.ApiDebug

public final class ApiDebug
extends Object

Various debugging utility methods.

Author:
Scott.Stark@jboss.org - the author of the original class info related methods.

Method Summary
static String getClassInfo(Class<?> clazz)
          Returns detailed info about the given class such as its name, interfaces, code source, and class loader.
static String getClassLoaderInfo(ClassLoader cl)
          Dumps out info on the specified class loader.
static URL[] getClassLoaderURLs(ClassLoader cl)
          Use reflection to access a URL[] getURLs or ULR[] getAllURLs method so that non-URLClassLoader class loaders, or class loaders that override getURLs to return null or empty, can provide the true classpath info.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getClassInfo

public static String getClassInfo(Class<?> clazz)
Returns detailed info about the given class such as its name, interfaces, code source, and class loader.

Parameters:
clazz - the class.
Returns:
the class info as a string.

getClassLoaderInfo

public static String getClassLoaderInfo(ClassLoader cl)
Dumps out info on the specified class loader. The dump describes the entire class loader hierarchy starting at the specified class loader.

Parameters:
cl - a class loader.
Returns:
the class loader info in a string.

getClassLoaderURLs

public static URL[] getClassLoaderURLs(ClassLoader cl)
Use reflection to access a URL[] getURLs or ULR[] getAllURLs method so that non-URLClassLoader class loaders, or class loaders that override getURLs to return null or empty, can provide the true classpath info.

Parameters:
cl - a class loader.
Returns:
the classloader URLs.


Copyright © 2013–2017 QuartzDesk.com. All rights reserved.