Class BloatingClassLoader
java.lang.Object
java.lang.ClassLoader
java.security.SecureClassLoader
java.net.URLClassLoader
EDU.purdue.cs.bloat.context.BloatingClassLoader
- All Implemented Interfaces:
Closeable, AutoCloseable
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
ConstructorsConstructorDescriptionBloatingClassLoader(URL[] urls) Creates a newBloatingClassLoaderthat loads its classes from a given set of URLs.BloatingClassLoader(URL[] urls, ClassLoader parent) Creates a newBloatingClassLoaderthat loads its classes from a given set of URLs. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidbloat(ClassEditor ce) This method is invoked as a class is being loaded.protected ClassBefore theClassis created, invokebloat(ClassEditor).Returns aClassInfoLoaderthat loads classes from the same place as thisClassLoader.Methods inherited from class URLClassLoader
addURL, close, definePackage, findResource, findResources, getPermissions, getResourceAsStream, getURLs, newInstance, newInstanceMethods inherited from class SecureClassLoader
defineClass, defineClassMethods inherited from class 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
-
Constructor Details
-
BloatingClassLoader
Creates a newBloatingClassLoaderthat loads its classes from a given set of URLs. -
BloatingClassLoader
Creates a newBloatingClassLoaderthat loads its classes from a given set of URLs. Before attempting to load a class, thisBloatingClassLoaderwill delegate to its parent class loader.
-
-
Method Details
-
findClass
Before theClassis created, invokebloat(ClassEditor).- Overrides:
findClassin classURLClassLoader- Throws:
ClassNotFoundException
-
getClassInfoLoader
Returns aClassInfoLoaderthat loads classes from the same place as thisClassLoader. -
bloat
This method is invoked as a class is being loaded.
-