Logo Search packages:      
Sourcecode: aspectj version File versions  Download package

org::aspectj::weaver::tools::WeavingAdaptor Class Reference

Inheritance diagram for org::aspectj::weaver::tools::WeavingAdaptor:

org::aspectj::weaver::loadtime::ClassLoaderWeavingAdaptor

List of all members.


Detailed Description

This adaptor allows the AspectJ compiler to be embedded in an existing system to facilitate load-time weaving. It provides an interface for a weaving class loader to provide a classpath to be woven by a set of aspects. A callback is supplied to allow a class loader to define classes generated by the compiler during the weaving process.

A weaving class loader should create a WeavingAdaptor before any classes are defined, typically during construction. The set of aspects passed to the adaptor is fixed for the lifetime of the adaptor although the classpath can be augmented. A system property can be set to allow verbose weaving messages to be written to the console.

Definition at line 69 of file WeavingAdaptor.java.


Public Member Functions

void addURL (URL url)
String getContextId ()
IMessageHolder getMessageHolder ()
byte[] weaveClass (String name, byte[] bytes, boolean mustWeave) throws IOException
byte[] weaveClass (String name, byte[] bytes) throws IOException
 WeavingAdaptor (GeneratedClassHandler handler, URL[] classURLs, URL[] aspectURLs)
 WeavingAdaptor (WeavingClassLoader loader)

Static Public Attributes

static final String SHOW_WEAVE_INFO_PROPERTY = "org.aspectj.weaver.showWeaveInfo"
static final String TRACE_MESSAGES_PROPERTY = "org.aspectj.tracing.messages"
static final String WEAVING_ADAPTOR_VERBOSE = "aj.weaving.verbose"

Protected Member Functions

boolean accept (String name, byte[] bytes)
void createMessageHandler ()
boolean debug (String message)
void disable ()
void dump (String name, byte[] b, boolean before)
void enable ()
void ensureDelegateInitialized (String name, byte[] bytes)
boolean error (String message, Throwable th)
boolean error (String message)
String getDumpDir ()
IMessageHandler getMessageHandler ()
boolean info (String message)
boolean isEnabled ()
void setMessageHandler (IMessageHandler mh)
boolean shouldDump (String name, boolean before)
boolean warn (String message, Throwable th)
boolean warn (String message)

Protected Attributes

BcelWorld bcelWorld
BcelObjectType delegateForCurrentClass
Map generatedClasses = new HashMap()
GeneratedClassHandler generatedClassHandler
boolean verbose = getVerbose()
BcelWeaver weaver

Private Member Functions

void addAspectLibrary (String aspectLibraryName)
boolean couldWeave (String name, byte[] bytes)
byte[] getAtAspectJAspectBytes (String name, byte[] bytes) throws IOException
List getFullAspectPath (ClassLoader loader)
List getFullClassPath (ClassLoader loader)
byte[] getWovenBytes (String name, byte[] bytes) throws IOException
void init (List classPath, List aspectPath)
void registerAspectLibraries (List aspectPath)
boolean shouldWeaveAnnotationStyleAspect (String name, byte[] bytes)
boolean shouldWeaveName (String name)

Static Private Member Functions

static boolean getVerbose ()
static List makeClasspath (String cp)

Private Attributes

boolean abortOnError = false
boolean enabled = false
boolean haveWarnedOnJavax = false
IMessageHandler messageHandler
WeavingAdaptorMessageHolder messageHolder
int weavingSpecialTypes = 0

Static Private Attributes

static final int INITIALIZED = 0x1
static Trace trace = TraceFactory.getTraceFactory().getTrace(WeavingAdaptor.class)
static final int WEAVE_JAVA_PACKAGE = 0x2
static final int WEAVE_JAVAX_PACKAGE = 0x4

Classes

class  WeavingAdaptorMessageHolder
class  WeavingAdaptorMessageWriter
class  WeavingClassFileProvider

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index