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
-
Constructor Summary
ConstructorDescriptionWeavingURLClassLoader(ClassLoader parent)
WeavingURLClassLoader(URL[] urls, ClassLoader parent)
WeavingURLClassLoader(URL[] classURLs, URL[] aspectURLs, ClassLoader parent)
-
Method Summary
Modifier and TypeMethodDescriptionvoid
acceptClass(String name, byte[] classBytes, byte[] weavedBytes)
Accept class generated by WeavingAdaptor.protected void
protected Class
defineClass(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, findClass
Methods inherited from class java.net.URLClassLoader
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
-
Field Details
-
WEAVING_CLASS_PATH
- See Also:
- Constant Field Values
-
WEAVING_ASPECT_PATH
- See Also:
- Constant Field Values
-
-
Constructor Details
-
WeavingURLClassLoader
-
WeavingURLClassLoader
-
WeavingURLClassLoader
-
-
Method Details
-
addURL
- Overrides:
addURL
in classExtensibleURLClassLoader
-
defineClass
Override to weave class using WeavingAdaptor- Overrides:
defineClass
in classExtensibleURLClassLoader
- Throws:
IOException
-
getBytes
Override to find classes generated by WeavingAdaptor- Overrides:
getBytes
in classExtensibleURLClassLoader
- Throws:
IOException
-
getAspectURLs
Implement method from WeavingClassLoader- Specified by:
getAspectURLs
in interfaceWeavingClassLoader
- Returns:
- the aspects used for weaving classes.
-
acceptClass
Description copied from interface:GeneratedClassHandler
Accept class generated by WeavingAdaptor. The class loader should store the class definition in its local cache until called upon to load it.- Specified by:
acceptClass
in interfaceGeneratedClassHandler
- Parameters:
name
- class nameclassBytes
- original class bytesweavedBytes
- woven class bytes
-