Package jade
Class JadeClassLoader
- java.lang.Object
-
- jade.JadeClassLoader
-
public class JadeClassLoader extends Object
The Class JadeClassLoader serves as central class that enable class loading by a class name. For this, all methods used within JADE were substituted with corresponding static methods. To enable class loading in an OSGI environment you may implement your ownJadeClassLoaderServiceand use the static methodsetClassLoaderService(JadeClassLoaderService)to enable its usage.- Author:
- Christian Derksen - SOFTEC - ICB - University of Duisburg-Essen
-
-
Constructor Summary
Constructors Constructor Description JadeClassLoader()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Class<?>forName(String className)Central forName method for getting class instances from the JADE bundle.static Class<?>forName(String className, boolean initialize, ClassLoader loader)Central forName method for getting class instances from the JADE bundle, using the given class loader.static voidsetClassLoaderService(JadeClassLoaderService classLoaderService)Sets the individualJadeClassLoaderServiceto be used for class loading.
-
-
-
Method Detail
-
forName
public static Class<?> forName(String className) throws ClassNotFoundException
Central forName method for getting class instances from the JADE bundle.- Parameters:
className- the fully qualified name of the desired class- Returns:
- the class
- Throws:
ClassNotFoundException- the class not found exception
-
forName
public static Class<?> forName(String className, boolean initialize, ClassLoader loader) throws ClassNotFoundException
Central forName method for getting class instances from the JADE bundle, using the given class loader.- Parameters:
className- the fully qualified name of the desired classinitialize- whether the class must be initializedloader- the class loader from which the class must be loaded- Returns:
- the class
- Throws:
ClassNotFoundException- the class not found exception
-
setClassLoaderService
public static void setClassLoaderService(JadeClassLoaderService classLoaderService)
Sets the individualJadeClassLoaderServiceto be used for class loading.- Parameters:
classLoaderService- the new class loader service
-
-