Package jade

Class 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 own JadeClassLoaderService and use the static method setClassLoaderService(JadeClassLoaderService) to enable its usage.
    Author:
    Christian Derksen - SOFTEC - ICB - University of Duisburg-Essen
    • Constructor Detail

      • JadeClassLoader

        public JadeClassLoader()
    • 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 class
        initialize - whether the class must be initialized
        loader - 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 individual JadeClassLoaderService to be used for class loading.
        Parameters:
        classLoaderService - the new class loader service