Class ByteCodeClassLoader

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.ClassLoader[] delegates
      Additional delegates besides the parent.
    • Constructor Summary

      Constructors 
      Constructor Description
      ByteCodeClassLoader​(java.lang.ClassLoader... parents)
      Creates the loader.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void addDelegates​(java.lang.ClassLoader[] parents)  
      java.lang.ClassLoader asClassLoader()
      Access to the classloader type.
      java.lang.Class<?> doDefineClass​(byte[] classcode)
      Defines a new class.
      java.lang.Class<?> doDefineClass​(java.lang.String name, byte[] b, int off, int len)
      Exposes the defineClass() method.
      java.lang.Class<?> doDefineClass​(java.lang.String name, byte[] b, int off, int len, java.security.ProtectionDomain protectiondomain)
      Exposes the defineClass() method.
      java.lang.Class<?> doDefineClassInParent​(java.lang.String name, byte[] b, int off, int len, java.security.ProtectionDomain protectiondomain)
      Exposes the defineClass() method for explicit indirect definition.
      protected java.lang.Class<?> findClass​(java.lang.String name)
      Delegation.
      • Methods inherited from class java.lang.ClassLoader

        clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findLibrary, findLoadedClass, findResource, findResource, findResources, findSystemClass, getClassLoadingLock, getDefinedPackage, getDefinedPackages, getName, getPackage, getPackages, getParent, getPlatformClassLoader, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, getUnnamedModule, isRegisteredAsParallelCapable, loadClass, loadClass, 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

      • delegates

        protected java.lang.ClassLoader[] delegates
        Additional delegates besides the parent.
    • Constructor Detail

      • ByteCodeClassLoader

        public ByteCodeClassLoader​(java.lang.ClassLoader... parents)
        Creates the loader.
        Parameters:
        parent - Parent loaders.
    • Method Detail

      • findClass

        protected java.lang.Class<?> findClass​(java.lang.String name)
                                        throws java.lang.ClassNotFoundException
        Delegation.
        Overrides:
        findClass in class java.lang.ClassLoader
        Throws:
        java.lang.ClassNotFoundException
      • asClassLoader

        public java.lang.ClassLoader asClassLoader()
        Access to the classloader type.
        Specified by:
        asClassLoader in interface IByteCodeClassLoader
        Returns:
        ClassLoader.
      • doDefineClass

        public java.lang.Class<?> doDefineClass​(byte[] classcode)
        Defines a new class.
        Specified by:
        doDefineClass in interface IByteCodeClassLoader
        Parameters:
        classcode - Code of the class.
        Returns:
        The generated class.
      • doDefineClass

        public java.lang.Class<?> doDefineClass​(java.lang.String name,
                                                byte[] b,
                                                int off,
                                                int len)
        Exposes the defineClass() method.
        Specified by:
        doDefineClass in interface IByteCodeClassLoader
      • doDefineClass

        public java.lang.Class<?> doDefineClass​(java.lang.String name,
                                                byte[] b,
                                                int off,
                                                int len,
                                                java.security.ProtectionDomain protectiondomain)
        Exposes the defineClass() method.
        Specified by:
        doDefineClass in interface IByteCodeClassLoader
      • doDefineClassInParent

        public java.lang.Class<?> doDefineClassInParent​(java.lang.String name,
                                                        byte[] b,
                                                        int off,
                                                        int len,
                                                        java.security.ProtectionDomain protectiondomain)
        Exposes the defineClass() method for explicit indirect definition.
        Specified by:
        doDefineClassInParent in interface IByteCodeClassLoader
      • addDelegates

        protected void addDelegates​(java.lang.ClassLoader[] parents)