Package org.aspectj.weaver.loadtime
Class WeavingURLClassLoader
java.lang.Object
java.lang.ClassLoader
java.security.SecureClassLoader
java.net.URLClassLoader
org.aspectj.weaver.bcel.ExtensibleURLClassLoader
org.aspectj.weaver.loadtime.WeavingURLClassLoader
- All Implemented Interfaces:
Closeable,AutoCloseable,GeneratedClassHandler,WeavingClassLoader
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionWeavingURLClassLoader(ClassLoader parent) WeavingURLClassLoader(URL[] urls, ClassLoader parent) WeavingURLClassLoader(URL[] classURLs, URL[] aspectURLs, ClassLoader parent) -
Method Summary
Modifier and TypeMethodDescriptionvoidacceptClass(String name, byte[] classBytes, byte[] weavedBytes) Accept class generated by WeavingAdaptor.protected voidprotected ClassdefineClass(String name, byte[] b, CodeSource cs) Override to weave class using WeavingAdaptorURL[]Implement method from WeavingClassLoaderprotected byte[]Override to find classes generated by WeavingAdaptorMethods inherited from class org.aspectj.weaver.bcel.ExtensibleURLClassLoader
close, findClassMethods inherited from class java.net.URLClassLoader
definePackage, findResource, findResources, getPermissions, getResourceAsStream, getURLs, newInstance, newInstanceMethods inherited from class java.security.SecureClassLoader
defineClass, defineClassMethods 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
-
Field Details
-
WEAVING_CLASS_PATH
- See Also:
-
WEAVING_ASPECT_PATH
- See Also:
-
-
Constructor Details
-
WeavingURLClassLoader
-
WeavingURLClassLoader
-
WeavingURLClassLoader
-
-
Method Details
-
addURL
- Overrides:
addURLin classExtensibleURLClassLoader
-
defineClass
Override to weave class using WeavingAdaptor- Overrides:
defineClassin classExtensibleURLClassLoader- Throws:
IOException
-
getBytes
Override to find classes generated by WeavingAdaptor- Overrides:
getBytesin classExtensibleURLClassLoader- Throws:
IOException
-
getAspectURLs
Implement method from WeavingClassLoader- Specified by:
getAspectURLsin interfaceWeavingClassLoader- Returns:
- the aspects used for weaving classes.
-
acceptClass
Description copied from interface:GeneratedClassHandlerAccept class generated by WeavingAdaptor. The class loader should store the class definition in its local cache until called upon to load it.- Specified by:
acceptClassin interfaceGeneratedClassHandler- Parameters:
name- class nameclassBytes- original class bytesweavedBytes- woven class bytes
-