Class BloatingClassLoader

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

    public abstract class BloatingClassLoader
    extends java.net.URLClassLoader
    BloatingClassLoader is a Java class loader that BLOATs a class before it is loader into a Java Virtual Machine. It loads its classes from a set of URLs.
    • Constructor Summary

      Constructors 
      Constructor Description
      BloatingClassLoader​(java.net.URL[] urls)
      Creates a new BloatingClassLoader that loads its classes from a given set of URLs.
      BloatingClassLoader​(java.net.URL[] urls, java.lang.ClassLoader parent)
      Creates a new BloatingClassLoader that loads its classes from a given set of URLs.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected abstract void bloat​(ClassEditor ce)
      This method is invoked as a class is being loaded.
      protected java.lang.Class findClass​(java.lang.String name)
      Before the Class is created, invoke bloat(ClassEditor).
      ClassInfoLoader getClassInfoLoader()
      Returns a ClassInfoLoader that loads classes from the same place as this ClassLoader.
      • Methods inherited from class java.net.URLClassLoader

        addURL, close, definePackage, findResource, findResources, getPermissions, getResourceAsStream, getURLs, newInstance, newInstance
      • Methods inherited from class java.security.SecureClassLoader

        defineClass, defineClass
      • Methods inherited from class java.lang.ClassLoader

        clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findLibrary, findLoadedClass, findResource, findSystemClass, getClassLoadingLock, getDefinedPackage, getDefinedPackages, getName, getPackage, getPackages, getParent, getPlatformClassLoader, getResource, 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
    • Constructor Detail

      • BloatingClassLoader

        public BloatingClassLoader​(java.net.URL[] urls)
        Creates a new BloatingClassLoader that loads its classes from a given set of URLs.
      • BloatingClassLoader

        public BloatingClassLoader​(java.net.URL[] urls,
                                   java.lang.ClassLoader parent)
        Creates a new BloatingClassLoader that loads its classes from a given set of URLs. Before attempting to load a class, this BloatingClassLoader will delegate to its parent class loader.
    • Method Detail

      • findClass

        protected java.lang.Class findClass​(java.lang.String name)
                                     throws java.lang.ClassNotFoundException
        Before the Class is created, invoke bloat(ClassEditor).
        Overrides:
        findClass in class java.net.URLClassLoader
        Throws:
        java.lang.ClassNotFoundException
      • getClassInfoLoader

        public ClassInfoLoader getClassInfoLoader()
        Returns a ClassInfoLoader that loads classes from the same place as this ClassLoader.
      • bloat

        protected abstract void bloat​(ClassEditor ce)
        This method is invoked as a class is being loaded.