|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.mx.loading.ClassLoaderUtils
Utility methods for class loader to package names, etc.
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 |
newPackageSet()
Create a new package set |
static String[] |
updateClassNamesMap(RepositoryClassLoader cl,
Map classNamesMap)
Given a UCL this method determine what classes it contains and create a mapping from the class names to the cl. |
static String[] |
updateClassNamesMap(RepositoryClassLoader cl,
Map classNamesMap,
URL url,
String[] prevClassNames)
Augment the class names associated with a UCL. |
static String[] |
updatePackageMap(RepositoryClassLoader cl,
Map packagesMap)
Given a UCL this method determine what packages it contains and create a mapping from the package names to the cl. |
static String[] |
updatePackageMap(RepositoryClassLoader cl,
Map packagesMap,
URL url,
String[] prevPkgNames)
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)
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)
public static String getResourceName(String className)
public static Set newPackageSet()
public static Set clonePackageSet(Object toClone)
public static String[] updatePackageMap(RepositoryClassLoader cl, Map packagesMap) throws Exception
cl
- the UCL that loads from urlpackagesMap
- the MapException
public static String[] updatePackageMap(RepositoryClassLoader cl, Map packagesMap, URL url, String[] prevPkgNames) throws Exception
cl
- the UCL that loads from urlpackagesMap
- the Mapurl
- the URL to parse for package namesprevPkgNames
- the set of pckage names already associated with cl
Exception
public static String[] updateClassNamesMap(RepositoryClassLoader cl, Map classNamesMap) throws Exception
cl
- the UCL that loads from urlclassNamesMap
- the MapException
public static String[] updateClassNamesMap(RepositoryClassLoader 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
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |