Package jadex.commons

Class ByteClassLoader


  • public class ByteClassLoader
    extends java.lang.ClassLoader
    This class loader instantiate classes provided as a byte array.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.util.Map classes
      The map of loaded classes.
    • Constructor Summary

      Constructors 
      Constructor Description
      ByteClassLoader​(java.lang.ClassLoader parent)
      Create a new byte class loader.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Class loadClass​(java.lang.String classname)
      Load a class via the classname.
      java.lang.Class loadClass​(java.lang.String classname, boolean resolve)
      Load a class via the classname.
      java.lang.Class loadClass​(java.lang.String classname, byte[] data, boolean resolve)
      Load a class via the classname.
      • Methods inherited from class java.lang.ClassLoader

        clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findClass, findLibrary, findLoadedClass, findResource, findResource, findResources, findSystemClass, getClassLoadingLock, getDefinedPackage, getDefinedPackages, getName, getPackage, getPackages, getParent, getPlatformClassLoader, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, getUnnamedModule, isRegisteredAsParallelCapable, registerAsParallelCapable, resolveClass, resources, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • classes

        protected java.util.Map classes
        The map of loaded classes.
    • Constructor Detail

      • ByteClassLoader

        public ByteClassLoader​(java.lang.ClassLoader parent)
        Create a new byte class loader.
    • Method Detail

      • loadClass

        public java.lang.Class loadClass​(java.lang.String classname)
                                  throws java.lang.ClassNotFoundException
        Load a class via the classname.
        Overrides:
        loadClass in class java.lang.ClassLoader
        Parameters:
        classname - The class name.
        Returns:
        The class.
        Throws:
        java.lang.ClassNotFoundException
      • loadClass

        public java.lang.Class loadClass​(java.lang.String classname,
                                         boolean resolve)
                                  throws java.lang.ClassNotFoundException
        Load a class via the classname.
        Overrides:
        loadClass in class java.lang.ClassLoader
        Parameters:
        classname - The class name.
        resolve - The resolve flag.
        Returns:
        The class.
        Throws:
        java.lang.ClassNotFoundException
      • loadClass

        public java.lang.Class loadClass​(java.lang.String classname,
                                         byte[] data,
                                         boolean resolve)
                                  throws java.lang.ClassNotFoundException
        Load a class via the classname.
        Parameters:
        classname - The class name.
        resolve - The resolve flag.
        Returns:
        The class.
        Throws:
        java.lang.ClassNotFoundException