Package org.aspectj.weaver.loadtime
Klasse DefaultWeavingContext
java.lang.Object
org.aspectj.weaver.loadtime.DefaultWeavingContext
- Alle implementierten Schnittstellen:
IWeavingContext
Use in non-OSGi environment
- Autor:
- David Knibb
-
Feldübersicht
-
Konstruktorübersicht
KonstruktorBeschreibungDefaultWeavingContext
(ClassLoader loader) Construct a new WeavingContext to use the specified ClassLoader This is the constructor which should be used. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibunggetBundleIdFromURL
(URL url) In an OSGi environment, determine which bundle a URL originated from.In an environment with multiple class loaders allows each to be identified using something safer and possibly shorter than toStringgetDefinitions
(ClassLoader loader, WeavingAdaptor adaptor) Simply call weaving adaptor back to parse aop.xmlFormat a URLgetId()
In an environment with multiple class loaders allows messages to identified according to the weaving contextgetResources
(String name) Same as ClassLoader.getResources()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.
-
Felddetails
-
loaderRef
-
-
Konstruktordetails
-
DefaultWeavingContext
Construct a new WeavingContext to use the specified ClassLoader This is the constructor which should be used.- Parameter:
loader
-
-
-
Methodendetails
-
getResources
Same as ClassLoader.getResources()- Angegeben von:
getResources
in SchnittstelleIWeavingContext
- Parameter:
name
- the name of the resource to search for- Gibt zurück:
- an enumeration containing all of the matching resources found
- Löst aus:
IOException
-
getBundleIdFromURL
Beschreibung aus Schnittstelle kopiert:IWeavingContext
In an OSGi environment, determine which bundle a URL originated from. In a non-OSGi environment, implementors should returnnull
.- Angegeben von:
getBundleIdFromURL
in SchnittstelleIWeavingContext
- Parameter:
url
-- Gibt zurück:
- null as we are not in an OSGi environment (therefore no bundles)
-
getClassLoaderName
Beschreibung aus Schnittstelle kopiert:IWeavingContext
In an environment with multiple class loaders allows each to be identified using something safer and possibly shorter than toString- Angegeben von:
getClassLoaderName
in SchnittstelleIWeavingContext
- Gibt zurück:
- classname@hashcode
-
getClassLoader
- Angegeben von:
getClassLoader
in SchnittstelleIWeavingContext
-
getFile
Beschreibung aus Schnittstelle kopiert:IWeavingContext
Format a URL- Angegeben von:
getFile
in SchnittstelleIWeavingContext
- Gibt zurück:
- filename
-
getId
Beschreibung aus Schnittstelle kopiert:IWeavingContext
In an environment with multiple class loaders allows messages to identified according to the weaving context- Angegeben von:
getId
in SchnittstelleIWeavingContext
- Gibt zurück:
- unqualifiedclassname@hashcode
-
getSuffix
-
isLocallyDefined
Beschreibung aus Schnittstelle kopiert:IWeavingContext
Return true if the classloader associated with this weaving context is the one that will define the class with the specified name. In a delegating classloader hierarchy this might check the parent won't define it and the child will - in OSGi it will do something else.- Angegeben von:
isLocallyDefined
in SchnittstelleIWeavingContext
- Parameter:
classname
- name of the class, eg. "java.lang.String"- Gibt zurück:
- true if the associated classloader will define the class
-
getDefinitions
Simply call weaving adaptor back to parse aop.xml- Angegeben von:
getDefinitions
in SchnittstelleIWeavingContext
- Parameter:
loader
-adaptor
-- Gibt zurück:
- List containing 0 or more Definition instances
-