org.aspectj.weaver.loadtime
Class ClassLoaderWeavingAdaptor

java.lang.Object
  extended by org.aspectj.weaver.tools.WeavingAdaptor
      extended by org.aspectj.weaver.loadtime.ClassLoaderWeavingAdaptor
All Implemented Interfaces:
IMessageContext

public class ClassLoaderWeavingAdaptor
extends WeavingAdaptor

Author:
Alexandre Vasseur, Andy Clement, Abraham Nevado

Field Summary
 
Fields inherited from class org.aspectj.weaver.tools.WeavingAdaptor
delegateForCurrentClass, SHOW_WEAVE_INFO_PROPERTY, TRACE_MESSAGES_PROPERTY, WEAVING_ADAPTOR_VERBOSE
 
Constructor Summary
ClassLoaderWeavingAdaptor()
           
ClassLoaderWeavingAdaptor(java.lang.ClassLoader deprecatedLoader, IWeavingContext deprecatedContext)
          Deprecated.  
 
Method Summary
 void flushGeneratedClasses()
          Flush the generated classes cache
 boolean generatedClassesExistFor(java.lang.String className)
          Check to see if any classes are stored in the generated classes cache.
 java.lang.String getContextId()
           
 java.lang.String getNamespace()
           
 void initialize(java.lang.ClassLoader classLoader, IWeavingContext context)
           
 
Methods inherited from class org.aspectj.weaver.tools.WeavingAdaptor
addURL, getMessageHolder, weaveClass, weaveClass
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassLoaderWeavingAdaptor

public ClassLoaderWeavingAdaptor()

ClassLoaderWeavingAdaptor

public ClassLoaderWeavingAdaptor(java.lang.ClassLoader deprecatedLoader,
                                 IWeavingContext deprecatedContext)
Deprecated. 

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.

Method Detail

initialize

public void initialize(java.lang.ClassLoader classLoader,
                       IWeavingContext context)

getContextId

public java.lang.String getContextId()
Specified by:
getContextId in interface IMessageContext
Overrides:
getContextId in class WeavingAdaptor

getNamespace

public java.lang.String getNamespace()
Returns:
Returns the key.

generatedClassesExistFor

public boolean generatedClassesExistFor(java.lang.String className)
Check to see if any classes are stored in the generated classes cache. Then flush the cache if it is not empty

Parameters:
className - TODO
Returns:
true if a class has been generated and is stored in the cache

flushGeneratedClasses

public void flushGeneratedClasses()
Flush the generated classes cache