Schnittstelle IWeavingContext

Alle bekannten Implementierungsklassen:
DefaultWeavingContext

public interface IWeavingContext
This class adds support to AspectJ for an OSGi environment
Autor:
David Knibb
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    Veraltet.
    use getFile() or getClassLoaderName()
     
    In an environment with multiple class loaders allows each to be identified using something safer and possibly shorter than toString
    Allow custom parsing of aop.xml or alternative mechanism for providing Definitions
    getFile(URL url)
    Format a URL
    In an environment with multiple class loaders allows messages to identified according to the weaving context
    Allows the standard ClassLoader.getResources() mechanisms to be replaced with a different implementation.
    boolean
    Return true if the classloader associated with this weaving context is the one that will define the class with the specified name.
  • Methodendetails

    • getResources

      Enumeration<URL> getResources(String name) throws IOException
      Allows the standard ClassLoader.getResources() mechanisms to be replaced with a different implementation. In an OSGi environment, this will allow for filtering to take place on the results of ClassLoader.getResources(). In a non-OSGi environment, ClassLoader.getResources should be returned.
      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

      String getBundleIdFromURL(URL url)
      Veraltet.
      use getFile() or getClassLoaderName()
      In an OSGi environment, determine which bundle a URL originated from. In a non-OSGi environment, implementors should return null.
      Parameter:
      url -
      Gibt zurück:
    • getClassLoaderName

      String getClassLoaderName()
      In an environment with multiple class loaders allows each to be identified using something safer and possibly shorter than toString
      Gibt zurück:
      name of the associated class loader
    • getClassLoader

      ClassLoader getClassLoader()
    • getFile

      String getFile(URL url)
      Format a URL
      Gibt zurück:
      filename
    • getId

      String getId()
      In an environment with multiple class loaders allows messages to identified according to the weaving context
      Gibt zurück:
      short name
    • isLocallyDefined

      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. 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.
      Parameter:
      classname - name of the class, eg. "java.lang.String"
      Gibt zurück:
      true if the associated classloader will define the class
    • getDefinitions

      List<Definition> getDefinitions(ClassLoader loader, WeavingAdaptor adaptor)
      Allow custom parsing of aop.xml or alternative mechanism for providing Definitions
      Parameter:
      loader -
      adaptor -
      Gibt zurück:
      List containing 0 or more Definition instances