Package org.openbravo.base.util
Class OBClassLoader
- java.lang.Object
-
- org.openbravo.base.util.OBClassLoader
-
- All Implemented Interfaces:
OBProvidable
,OBSingleton
- Direct Known Subclasses:
OBClassLoader.ClassOBClassLoader
public class OBClassLoader extends Object implements OBSingleton
The OBClassLoader is used to support different classloading scenarios. As a default two classloaders are present: the context (the default, used in Tomcat) and the class classloader. The class classloader is used in Ant tasks.Use the
OBProvider
to define which classloader in a specific environment.- Author:
- mtaal
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
OBClassLoader.ClassOBClassLoader
A class loader which uses the classloader of the Class class.
-
Constructor Summary
Constructors Constructor Description OBClassLoader()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static OBClassLoader
getInstance()
Class<?>
loadClass(String className)
Load a class using the classloader.
-
-
-
Method Detail
-
getInstance
public static OBClassLoader getInstance()
-
loadClass
public Class<?> loadClass(String className) throws ClassNotFoundException
Load a class using the classloader. This method will throw an OBException if the class is not found. This exception is logged.- Parameters:
className
- the name of the class to load- Throws:
ClassNotFoundException
-
-