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