Klasse ClassLoaderWeavingAdaptor

java.lang.Object
org.aspectj.weaver.tools.WeavingAdaptor
org.aspectj.weaver.loadtime.ClassLoaderWeavingAdaptor
Alle implementierten Schnittstellen:
IMessageContext

public class ClassLoaderWeavingAdaptor extends WeavingAdaptor
Autor:
Alexandre Vasseur, Andy Clement, Abraham Nevado, David Knibb, John Kew
  • Konstruktordetails

    • ClassLoaderWeavingAdaptor

      public ClassLoaderWeavingAdaptor()
    • ClassLoaderWeavingAdaptor

      @Deprecated public ClassLoaderWeavingAdaptor(ClassLoader deprecatedLoader, IWeavingContext deprecatedContext)
      Veraltet.
      We don't need a reference to the class loader and using it during construction can cause problems with recursion. It also makes sense to supply the weaving context during initialization to.
  • Methodendetails

    • initialize

      public void initialize(ClassLoader classLoader, IWeavingContext context)
    • lint

      protected void lint(String name, String[] infos)
    • getContextId

      public String getContextId()
      Angegeben von:
      getContextId in Schnittstelle IMessageContext
      Setzt außer Kraft:
      getContextId in Klasse WeavingAdaptor
    • accept

      protected boolean accept(String className, byte[] bytes)
      Determine whether a type should be accepted for weaving, by checking it against any includes/excludes.
      Setzt außer Kraft:
      accept in Klasse WeavingAdaptor
      Parameter:
      className - the name of the type to possibly accept
      bytes - the bytecode for the type (in case we need to look inside, eg. annotations)
      Gibt zurück:
      true if it should be accepted for weaving
    • shouldDump

      protected boolean shouldDump(String className, boolean before)
      Setzt außer Kraft:
      shouldDump in Klasse WeavingAdaptor
    • getDumpDir

      protected String getDumpDir()
      Setzt außer Kraft:
      getDumpDir in Klasse WeavingAdaptor
      Gibt zurück:
      the directory in which to dump - default is _ajdump but it
    • getNamespace

      public String getNamespace()
      Gibt zurück:
      Returns the key.
    • generatedClassesExistFor

      public boolean generatedClassesExistFor(String className)
      Check to see if any classes are stored in the generated classes cache. Then flush the cache if it is not empty
      Parameter:
      className - TODO
      Gibt zurück:
      true if a class has been generated and is stored in the cache
    • flushGeneratedClasses

      public void flushGeneratedClasses()
      Flush the generated classes cache
    • flushGeneratedClassesFor

      public void flushGeneratedClassesFor(String className)
      Remove generated classes based on the supplied className. This will remove any entries related to this name - so the class itself plus and inner classes.
      Parameter:
      className - a slashed classname (e.g. com/foo/Bar)