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 IWeavingContext
name
- the name of the resource to search forIOException
public String getBundleIdFromURL(URL url)
IWeavingContext
null.
getBundleIdFromURL
in interface IWeavingContext
public String getClassLoaderName()
IWeavingContext
getClassLoaderName
in interface IWeavingContext
public ClassLoader getClassLoader()
getClassLoader
in interface IWeavingContext
public String getFile(URL url)
IWeavingContext
getFile
in interface IWeavingContext
public String getId()
IWeavingContext
getId
in interface IWeavingContext
public String getSuffix()
public boolean isLocallyDefined(String classname)
IWeavingContext
isLocallyDefined
in interface IWeavingContext
classname
- name of the class, eg. "java.lang.String"public List<Definition> getDefinitions(ClassLoader loader, WeavingAdaptor adaptor)
getDefinitions
in interface IWeavingContext
weaver
- loader
-