TrueZIP 6.8.3

de.schlichtherle.util
Class ClassLoaders

java.lang.Object
  extended by de.schlichtherle.util.ClassLoaders

Deprecated. This class is just a workaround until the introduction of a better, but probably non-backwards-compatible solution in TrueZIP 7. Do not use!

public class ClassLoaders
extends Object

Provides static utility methods for convenient class and resource loading which is designed to work in both JEE and OSGi environments. You cannot instantiate this class.

Since:
TrueZIP 6.8
Author:
Christian Schlichtherle

Constructor Summary
ClassLoaders()
          Deprecated.  
 
Method Summary
static Enumeration getResources(String name, Class loadingClass)
          Deprecated. Concatenates the enumeration of the resource name on the class path by using the class loader of the class loadingClass and the current thread's context class loader or, if not available, the system class loader.
static Class loadClass(String classToLoad, Class loadingClass)
          Deprecated. Tries to load the class classToLoad using the class loader of the class loadingClass first or, failing that, using the current thread's context class loader or, if not available, the system class loader.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassLoaders

ClassLoaders()
Deprecated. 
Method Detail

loadClass

public static Class loadClass(String classToLoad,
                              Class loadingClass)
                       throws ClassNotFoundException
Deprecated. 
Tries to load the class classToLoad using the class loader of the class loadingClass first or, failing that, using the current thread's context class loader or, if not available, the system class loader.

Parameters:
classToLoad - The class to load.
loadingClass - The class which wants to load classToLoad.
Returns:
The loaded class.
Throws:
ClassNotFoundException - If loading the class failed for some reason.

getResources

public static Enumeration getResources(String name,
                                       Class loadingClass)
                                throws IOException
Deprecated. 
Concatenates the enumeration of the resource name on the class path by using the class loader of the class loadingClass and the current thread's context class loader or, if not available, the system class loader.

Parameters:
name - The resource to enumerate.
loadingClass - The class which wants to enumerate name.
Returns:
A joint enumeration for the resource name on the class path.
Throws:
IOException - If I/O errors occur.

TrueZIP 6.8.3

Copyright © 2005-2011 Schlichtherle IT Services. All Rights Reserved.