Top Fields Constructors Methods
org.aspectj.weaver.loadtime

public Class WeavingURLClassLoader

extends ExtensibleURLClassLoader
implements WeavingClassLoader
Class Inheritance
All Implemented Interfaces
org.aspectj.weaver.tools.WeavingClassLoader, org.aspectj.weaver.tools.GeneratedClassHandler
Imports
java.io.File, .IOException, java.net.MalformedURLException, .URL, java.security.CodeSource, java.util.ArrayList, .HashMap, .List, .Map, .StringTokenizer, org.aspectj.bridge.AbortException, org.aspectj.weaver.bcel.ExtensibleURLClassLoader, org.aspectj.weaver.tools.Trace, .TraceFactory, .WeavingAdaptor, .WeavingClassLoader

Field Summary

Modifier and TypeField and Description
private WeavingAdaptor
private URL[]
private Map<K, V>
private boolean
private static Trace
public static final String
public static final String

Constructor Summary

AccessConstructor and Description
public
public
public
WeavingURLClassLoader(URL[] classURLs, URL[] aspectURLs, ClassLoader parent)

Method Summary

Modifier and TypeMethod and Description
public void
acceptClass(String
class name
name
,
byte[]
original class bytes
classBytes
,
byte[]
woven class bytes
weavedBytes
)

Implements org.aspectj.weaver.tools.GeneratedClassHandler.acceptClass.

Accept class generated by WeavingAdaptor.
protected void
addURL(URL
the URL to be added to the search path of URLs
url
)

Overrides org.aspectj.weaver.bcel.ExtensibleURLClassLoader.addURL.

Appends the specified URL to the list of URLs to search for classes and resources.
private void
protected Class<T>
defineClass(String name, byte[] b, CodeSource cs)

Overrides org.aspectj.weaver.bcel.ExtensibleURLClassLoader.defineClass.

Override to weave class using WeavingAdaptor
private static String
public URL[]
getAspectURLs()

Implements org.aspectj.weaver.tools.WeavingClassLoader.getAspectURLs.

Implement method from WeavingClassLoader
protected byte[]
getBytes(String name)

Overrides org.aspectj.weaver.bcel.ExtensibleURLClassLoader.getBytes.

Override to find classes generated by WeavingAdaptor
private static String
private static URL[]
Inherited from org.aspectj.weaver.bcel.ExtensibleURLClassLoader:
closefindClass

Field Detail

adaptorback to summary
private WeavingAdaptor adaptor
aspectURLsback to summary
private URL[] aspectURLs
generatedClassesback to summary
private Map<K, V> generatedClasses
initializingAdaptorback to summary
private boolean initializingAdaptor
traceback to summary
private static Trace trace
WEAVING_ASPECT_PATHback to summary
public static final String WEAVING_ASPECT_PATH
WEAVING_CLASS_PATHback to summary
public static final String WEAVING_CLASS_PATH

Constructor Detail

WeavingURLClassLoaderback to summary
public WeavingURLClassLoader(ClassLoader parent)
WeavingURLClassLoaderback to summary
public WeavingURLClassLoader(URL[] urls, ClassLoader parent)
WeavingURLClassLoaderback to summary
public WeavingURLClassLoader(URL[] classURLs, URL[] aspectURLs, ClassLoader parent)

Method Detail

acceptClassback to summary
public void acceptClass(String name, byte[] classBytes, byte[] weavedBytes)

Implements org.aspectj.weaver.tools.GeneratedClassHandler.acceptClass.

Doc from org.aspectj.weaver.tools.GeneratedClassHandler.acceptClass.

Accept class generated by WeavingAdaptor. The class loader should store the class definition in its local cache until called upon to load it.

Parameters
name:String

class name

classBytes:byte[]

original class bytes

weavedBytes:byte[]

woven class bytes

addURLback to summary
protected void addURL(URL url)

Overrides org.aspectj.weaver.bcel.ExtensibleURLClassLoader.addURL.

Doc from java.net.URLClassLoader.addURL.

Appends the specified URL to the list of URLs to search for classes and resources.

If the URL specified is null or is already in the list of URLs, or if this loader is closed, then invoking this method has no effect.

Parameters
url:URL

the URL to be added to the search path of URLs

createAdaptorback to summary
private void createAdaptor()
defineClassback to summary
protected Class<T> defineClass(String name, byte[] b, CodeSource cs) throws IOException

Overrides org.aspectj.weaver.bcel.ExtensibleURLClassLoader.defineClass.

Override to weave class using WeavingAdaptor

getAspectPathback to summary
private static String getAspectPath()
getAspectURLsback to summary
public URL[] getAspectURLs()

Implements org.aspectj.weaver.tools.WeavingClassLoader.getAspectURLs.

Implement method from WeavingClassLoader

Returns:URL[]

Doc from org.aspectj.weaver.tools.WeavingClassLoader.getAspectURLs.

the aspects used for weaving classes.

getBytesback to summary
protected byte[] getBytes(String name) throws IOException

Overrides org.aspectj.weaver.bcel.ExtensibleURLClassLoader.getBytes.

Override to find classes generated by WeavingAdaptor

getClassPathback to summary
private static String getClassPath()
getURLsback to summary
private static URL[] getURLs(String path)