Class DefiningClassLoader

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Class<?> defineClass​(java.lang.String name, byte[] data)
      Define a new Java class.
      void linkClass​(java.lang.Class<?> cl)
      Link the given class.
      java.lang.Class<?> loadClass​(java.lang.String name, boolean resolve)  
      • Methods inherited from class java.lang.ClassLoader

        clearAssertionStatus, getDefinedPackage, getDefinedPackages, getName, getParent, getPlatformClassLoader, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, getUnnamedModule, isRegisteredAsParallelCapable, loadClass, resources, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DefiningClassLoader

        public DefiningClassLoader()
      • DefiningClassLoader

        public DefiningClassLoader​(java.lang.ClassLoader parentLoader)
    • Method Detail

      • defineClass

        public java.lang.Class<?> defineClass​(java.lang.String name,
                                              byte[] data)
        Description copied from interface: GeneratedClassLoader
        Define a new Java class. Classes created via this method should have the same class loader.
        Specified by:
        defineClass in interface GeneratedClassLoader
        Parameters:
        name - fully qualified class name
        data - class byte code
        Returns:
        new class object
      • loadClass

        public java.lang.Class<?> loadClass​(java.lang.String name,
                                            boolean resolve)
                                     throws java.lang.ClassNotFoundException
        Throws:
        java.lang.ClassNotFoundException