org.jbpm.util
Class ClassLoaderUtil

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

public class ClassLoaderUtil
extends java.lang.Object

provides centralized classloader lookup.


Method Summary
static java.lang.Class classForName(java.lang.String className)
           
static java.lang.Class classForName(java.lang.String className, boolean useConfiguredLoader)
           
static java.lang.ClassLoader getClassLoader()
          Returns the ClassLoader employed by jBPM to load classes referenced in the configuration.
static java.util.Properties getProperties(java.lang.String resource)
           
static java.io.InputStream getStream(java.lang.String resource)
           
static java.io.InputStream getStream(java.lang.String resource, boolean useConfiguredLoader)
          Load jbpm configuration related resources as stream (normally jbpm.cfg.xml).
static java.lang.Class loadClass(java.lang.String className)
          Deprecated. Use classForName(String) instead
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

loadClass

public static java.lang.Class loadClass(java.lang.String className)
Deprecated. Use classForName(String) instead

Bad usage of ClassLoader.loadClass() under JDK 6.

See Also:
JBPM-1976

classForName

public static java.lang.Class classForName(java.lang.String className)

classForName

public static java.lang.Class classForName(java.lang.String className,
                                           boolean useConfiguredLoader)

getClassLoader

public static java.lang.ClassLoader getClassLoader()
Returns the ClassLoader employed by jBPM to load classes referenced in the configuration. The class loader can be changed in jbpm.cfg.xml by setting the string property jbpm.class.loader. The possible values are:


getStream

public static java.io.InputStream getStream(java.lang.String resource)

getStream

public static java.io.InputStream getStream(java.lang.String resource,
                                            boolean useConfiguredLoader)
Load jbpm configuration related resources as stream (normally jbpm.cfg.xml). This method first tries to load the resource from the ClassLoaderUtil class loader, if not found it tries the context class loader. If this doesn't return any ressource the call is delegated to the class loader configured by calling getClassLoader(). This is a special method because the class loader which has to be used for loading the jbpm.cfg.xml cannot be configured in the jbpm.cfg.xml itself.


getProperties

public static java.util.Properties getProperties(java.lang.String resource)


Copyright © 2009 JBoss, a division of Red Hat. All Rights Reserved.