Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jbpm.util
Class ClassLoaderUtil

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

    public class ClassLoaderUtil

extends java.lang.Object

provides centralized classloader lookup.

Constructor Summary
`ClassLoaderUtil()`

Method Summary
`static java.lang.ClassLoader` | `getClassLoader()`
`static java.lang.ClassLoader` | `getProcessClassLoader(ProcessDefinition processDefinition)` searches the given resource, first on the root of the classpath and if not not found there, in the given directory.
`static java.util.Properties` | `getProperties(java.lang.String resource)`
`static java.io.InputStream` | `getStream(java.lang.String resource)`
`static java.lang.Class` | `loadClass(java.lang.String className)`

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

### loadClass

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

### getClassLoader

    public static java.lang.ClassLoader getClassLoader()

### getStream

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

### getProperties

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

### getProcessClassLoader

    public static java.lang.ClassLoader getProcessClassLoader(ProcessDefinition processDefinition)

  searches the given resource, first on the root of the classpath and if not not found there, in the given directory. public static InputStream getStream(String resource, String directory) { InputStream is = getClassLoader().getResourceAsStream(resource); if (is==null) { is = getClassLoader().getResourceAsStream(directory+"/"+resource); } return is; } public static Properties getProperties(String resource, String directory) { Properties properties = new Properties(); try { properties.load(getStream(resource, directory)); } catch (IOException e) { throw new JbpmException("couldn't load properties file '"+resource+"'", e); } return properties; }

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD