|
JBossMX Parent POM 6.0.0.GA | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.mx.loading.ClassLoaderUtils
public class ClassLoaderUtils
Utility methods for class loader to package names, etc.
Nested Class Summary | |
---|---|
static interface |
ClassLoaderUtils.PkgNameListener
|
Constructor Summary | |
---|---|
ClassLoaderUtils()
|
Method Summary | |
---|---|
static Set |
clonePackageSet(Object toClone)
Clone a package set |
static void |
displayClassInfo(Class clazz,
StringBuffer results)
Format a string buffer containing the Class, Interfaces, CodeSource, and ClassLoader information for the given object clazz. |
static URLClassLoader[] |
getClassLoaderStack(ClassLoader cl)
Get all of the URLClassLoaders from cl on up the hierarchy |
static URL[] |
getClassLoaderURLs(ClassLoader cl)
Use reflection to access a URL[] getURLs or URL[] getClasspath method so that non-URLClassLoader class loaders, or class loaders that override getURLs to return null or empty, can provide the true classpath info. |
static String |
getJarClassName(String className)
Translates a dot class name (java.lang.String) into a path form suitable for a jar entry (java/lang/String.class) |
static String |
getPackageName(String className)
Parse a class name into its package prefix. |
static String |
getResourceName(String className)
Parse a class name into its resource form. |
static Set<ClassLoader> |
newPackageSet()
Create a new package set |
static String[] |
updateClassNamesMap(Object cl,
Map classNamesMap,
URL url,
String[] prevClassNames)
Augment the class names associated with a UCL. |
static void |
updatePackageMap(URL url,
ClassLoaderUtils.PkgNameListener listener)
Augment the package name associated with a UCL. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ClassLoaderUtils()
Method Detail |
---|
public static void displayClassInfo(Class clazz, StringBuffer results)
clazz
- the Classresults
- - the buffer to write the info topublic static URL[] getClassLoaderURLs(ClassLoader cl)
cl
- the classloader
public static URLClassLoader[] getClassLoaderStack(ClassLoader cl)
cl
- the class loader to start from
public static String getJarClassName(String className)
className
- java.lang.String
public static String getPackageName(String className)
className
- the class name
public static String getResourceName(String className)
className
- the class name
public static Set<ClassLoader> newPackageSet()
public static Set clonePackageSet(Object toClone)
toClone
- set to clone
public static void updatePackageMap(URL url, ClassLoaderUtils.PkgNameListener listener) throws Exception
url
- the URL to parse for package nameslistener
- the listener
Exception
public static String[] updateClassNamesMap(Object cl, Map classNamesMap, URL url, String[] prevClassNames) throws Exception
cl
- the UCL that loads from urlclassNamesMap
- the Mapurl
- the URL to parse for class namesprevClassNames
- the set of pckage names already associated with cl
Exception
|
JBossMX Parent POM 6.0.0.GA | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |