Klasse AjPipeliningCompilerAdapter

java.lang.Object
org.aspectj.ajdt.internal.compiler.AbstractCompilerAdapter
org.aspectj.ajdt.internal.compiler.AjPipeliningCompilerAdapter
Alle implementierten Schnittstellen:
ICompilerAdapter

public class AjPipeliningCompilerAdapter extends AbstractCompilerAdapter
Adapts standard JDT Compiler to add in AspectJ specific behaviours. This version implements pipelining - where files are compiled and then woven immediately, unlike AjCompilerAdapter which compiles everything then weaves everything. (One small note: because all aspects have to be known before weaving can take place, the weaving pipeline is 'stalled' until all aspects have been compiled). The basic strategy is this: 1. diet parse all input source files - this is enough for us to implement ITD matching - this enables us to determine which are aspects 2. sort the input files, aspects first - keep a note of how many files contain aspects 3. if there are aspects, mark the pipeline as 'stalled' 3. repeat 3a. compile a file 3b. have we now compiled all aspects? NO - put file in a weave pending queue YES- unstall the 'pipeline' 3c. is the pipeline stalled? NO - weave all pending files and this one YES- do nothing Complexities arise because of: - what does -XterminateAfterCompilation mean? since there is no stage where everything is compiled and nothing is woven Here is the compiler loop difference when pipelining. the old way: Finished diet parsing [C:\temp\ajcSandbox\aspectjhead\ajcTest23160.tmp\ClassOne.java] Finished diet parsing [C:\temp\ajcSandbox\aspectjhead\ajcTest23160.tmp\ClassTwo.java] > AjLookupEnvironment.completeTypeBindings() < AjLookupEnvironment.completeTypeBindings() compiling C:\temp\ajcSandbox\aspectjhead\ajcTest23160.tmp\ClassOne.java >Compiler.process(C:\temp\ajcSandbox\aspectjhead\ajcTest23160.tmp\ClassOne.java) <Compiler.process(C:\temp\ajcSandbox\aspectjhead\ajcTest23160.tmp\ClassOne.java) compiling C:\temp\ajcSandbox\aspectjhead\ajcTest23160.tmp\ClassTwo.java >Compiler.process(C:\temp\ajcSandbox\aspectjhead\ajcTest23160.tmp\ClassTwo.java) <Compiler.process(C:\temp\ajcSandbox\aspectjhead\ajcTest23160.tmp\ClassTwo.java) >AjCompilerAdapter.weave() >BcelWeaver.prepareForWeave <BcelWeaver.prepareForWeave woven class ClassOne (from C:\temp\ajcSandbox\aspectjhead\ajcTest23160.tmp\ClassOne.java) woven class ClassTwo (from C:\temp\ajcSandbox\aspectjhead\ajcTest23160.tmp\ClassTwo.java) <AjCompilerAdapter.weave() the new way (see the compiling/weaving mixed up): Finished diet parsing [C:\temp\ajcSandbox\aspectjhead\ajcTest23160.tmp\ClassOne.java] Finished diet parsing [C:\temp\ajcSandbox\aspectjhead\ajcTest23160.tmp\ClassTwo.java] >AjLookupEnvironment.completeTypeBindings() <AjLookupEnvironment.completeTypeBindings() compiling C:\temp\ajcSandbox\aspectjhead\ajcTest23160.tmp\ClassOne.java >Compiler.process(C:\temp\ajcSandbox\aspectjhead\ajcTest23160.tmp\ClassOne.java) <Compiler.process(C:\temp\ajcSandbox\aspectjhead\ajcTest23160.tmp\ClassOne.java) >AjCompilerAdapter.weave() >BcelWeaver.prepareForWeave <BcelWeaver.prepareForWeave woven class ClassOne (from C:\temp\ajcSandbox\aspectjhead\ajcTest23160.tmp\ClassOne.java) <AjCompilerAdapter.weave() compiling C:\temp\ajcSandbox\aspectjhead\ajcTest23160.tmp\ClassTwo.java >Compiler.process(C:\temp\ajcSandbox\aspectjhead\ajcTest23160.tmp\ClassTwo.java) <Compiler.process(C:\temp\ajcSandbox\aspectjhead\ajcTest23160.tmp\ClassTwo.java) >AjCompilerAdapter.weave() woven class ClassTwo (from C:\temp\ajcSandbox\aspectjhead\ajcTest23160.tmp\ClassTwo.java) Ungültige Eingabe: "<"AjCompilerAdapter.weave()