org.nuiton.util
Class ClassLoaderUtil

java.lang.Object
  extended by org.nuiton.util.ClassLoaderUtil

public class ClassLoaderUtil
extends Object

A usefull class with method for ClassLoader

Author:
chemit

Constructor Summary
ClassLoaderUtil()
           
 
Method Summary
static URL[] getDeepURLs(URLClassLoader loader)
          Returns the all urls to be used in a URLClassLoader.
static URL[] getURLs(URLClassLoader classLoader)
          Recupere la liste des urls d'un URLClassLoader.
static void printLoader(ClassLoader loader)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassLoaderUtil

public ClassLoaderUtil()
Method Detail

getDeepURLs

public static URL[] getDeepURLs(URLClassLoader loader)
Returns the all urls to be used in a URLClassLoader.

If classloader has only one url and the url is a jar, try to load in manifest class-path

Parameters:
loader - the classloader (if null will use system one)
Returns:
all the url found in the classloader

getURLs

public static URL[] getURLs(URLClassLoader classLoader)
Recupere la liste des urls d'un URLClassLoader.

Note : Un cas particulier est positionné pour JBoss qui utilise la method getAllURLs.

Parameters:
classLoader - le class loader a scanner
Returns:
les urls du classloade.

printLoader

public static void printLoader(ClassLoader loader)


Copyright © 2004-2009 CodeLutin. All Rights Reserved.