public class DefaultWeavingContext extends java.lang.Object implements IWeavingContext
| Modifier and Type | Field and Description |
|---|---|
protected BcelWeakClassLoaderReference |
loaderRef |
| Constructor and Description |
|---|
DefaultWeavingContext(java.lang.ClassLoader loader)
Construct a new WeavingContext to use the specified ClassLoader This is the constructor which should be used.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getBundleIdFromURL(java.net.URL url)
In an OSGi environment, determin which bundle a URL originated from.
|
java.lang.ClassLoader |
getClassLoader() |
java.lang.String |
getClassLoaderName()
In an environment with multiple class loaders allows each to be
identified using something safer and possibly shorter than toString
|
java.util.List<Definition> |
getDefinitions(java.lang.ClassLoader loader,
WeavingAdaptor adaptor)
Simply call weaving adaptor back to parse aop.xml
|
java.lang.String |
getFile(java.net.URL url)
Format a URL
|
java.lang.String |
getId()
In an environment with multiple class loaders allows messages
to identified according to the weaving context
|
java.util.Enumeration |
getResources(java.lang.String name)
Same as ClassLoader.getResources()
|
java.lang.String |
getSuffix() |
boolean |
isLocallyDefined(java.lang.String classname)
Return true if the classloader associated with this weaving context
is the one that will define the class with the specified name.
|
protected BcelWeakClassLoaderReference loaderRef
public DefaultWeavingContext(java.lang.ClassLoader loader)
loader - public java.util.Enumeration getResources(java.lang.String name)
throws java.io.IOException
getResources in interface IWeavingContextname - the name of the resource to search forjava.io.IOExceptionpublic java.lang.String getBundleIdFromURL(java.net.URL url)
IWeavingContextnull.getBundleIdFromURL in interface IWeavingContextpublic java.lang.String getClassLoaderName()
IWeavingContextgetClassLoaderName in interface IWeavingContextpublic java.lang.ClassLoader getClassLoader()
getClassLoader in interface IWeavingContextpublic java.lang.String getFile(java.net.URL url)
IWeavingContextgetFile in interface IWeavingContextpublic java.lang.String getId()
IWeavingContextgetId in interface IWeavingContextpublic java.lang.String getSuffix()
public boolean isLocallyDefined(java.lang.String classname)
IWeavingContextisLocallyDefined in interface IWeavingContextclassname - name of the class, eg. "java.lang.String"public java.util.List<Definition> getDefinitions(java.lang.ClassLoader loader, WeavingAdaptor adaptor)
getDefinitions in interface IWeavingContextweaver - loader -