org.objectweb.fractal.adl.util
Class ClassLoaderHelper

java.lang.Object
  extended by org.objectweb.fractal.adl.util.ClassLoaderHelper

public class ClassLoaderHelper
extends Object

Helper methods related to ClassLoader.

Author:
Philippe Merle

Method Summary
static ClassLoader getClassLoader(Object object)
          Returns the class loader of the class of an object, i.e., object.getClass().getClassLoader().
static ClassLoader getClassLoader(Object object, Object map)
          Returns the class loader contained into the map or the class loader of the class of the object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getClassLoader

public static ClassLoader getClassLoader(Object object)
Returns the class loader of the class of an object, i.e., object.getClass().getClassLoader(). If the class of the object was loaded by the bootstrap class loader then its class loader may be null (@see java.lang.Class#getClassLoader()) then returns the system class loader (@see java.lang.ClassLoader#getSystemClassLoader()).

Parameters:
object - an object.
Returns:
the class loader.

getClassLoader

public static ClassLoader getClassLoader(Object object,
                                         Object map)
Returns the class loader contained into the map or the class loader of the class of the object.

Parameters:
object - an object.
map - a map.
Returns:
the class loader.