This is an annotated trace of an ajc compilation of HelloWorld (no aspects involved).
ajdtcore::Entering execution(void org.aspectj.tools.ajc.Main.main(String[]))
arguments ([Ljava.lang.String;@1ac1fe4)
// ---------------------------------------------------------------------------
// create an ajc.Main instance...
//
---------------------------------------------------------------------------
ajdtcore::Entering execution(org.aspectj.tools.ajc.Main()) arguments ()
// command controller is used for repeated compilations in incremental mode
ajdtcore::Entering execution(org.aspectj.tools.ajc.Main.CommandController()) arguments ()
ajdtcore::Exiting execution(org.aspectj.tools.ajc.Main.CommandController())
// message handler is used to accumulate
messages resulting from the compilation
bridge::Entering execution(org.aspectj.bridge.MessageHandler(boolean)) arguments (true)
bridge::Entering execution(void org.aspectj.bridge.MessageHandler.init(boolean)) arguments (true)
bridge::Exiting execution(void org.aspectj.bridge.MessageHandler.init(boolean)) return: null
bridge::Exiting
execution(org.aspectj.bridge.MessageHandler(boolean))\
ajdtcore::Exiting execution(org.aspectj.tools.ajc.Main())
//
----------------------------------------------------------------------------
// run it!
//
----------------------------------------------------------------------------
ajdtcore::Entering execution(void org.aspectj.tools.ajc.Main.runMain(String[], boolean))
arguments ([Ljava.lang.String;@1ac1fe4,true)
// set message
verboseness according to presence of -verbose arg
// run
// -------------
ajdtcore::Entering execution(void org.aspectj.tools.ajc.Main.run(String[], IMessageHolder))
arguments ([Ljava.lang.String;@1ac1fe4,MessageHandler: no messages)
// initialise the command controller -
strips out any incremental compilation options, leaving rest intact
ajdtcore::Entering execution(String[] org.aspectj.tools.ajc.Main.CommandController.init(String[], IMessageHandler))
arguments ([Ljava.lang.String;@1ac1fe4,MessageHandler: no messages)
// create a command object for
compilation (an ICommand)
bridge::Entering execution(ICommand org.aspectj.bridge.ReflectionFactory.makeCommand(String, IMessageHandler))
arguments (org.aspectj.ajdt.ajc.AjdtCommand,MessageHandler: no messages)
ajdtcore::Entering execution(org.aspectj.ajdt.ajc.AjdtCommand()) arguments ()
ajdtcore::Exiting execution(org.aspectj.ajdt.ajc.AjdtCommand())
...
bridge::Exiting execution(ICommand org.aspectj.bridge.ReflectionFactory.makeCommand(String, IMessageHandler))
return: org.aspectj.ajdt.ajc.AjdtCommand@11c8a71
//
----------------------------------------------------------------------------------------------------
// run the command... all the
command-line args except verbosity and incremental options are passed in
//
----------------------------------------------------------------------------------------------------
ajdtcore::Entering execution(boolean org.aspectj.ajdt.ajc.AjdtCommand.runCommand(String[], IMessageHandler))
arguments ([Ljava.lang.String;@1ac1fe4,MessageHandler: no messages)
// create a build manager that sends messages to the given
message holder
ajdtcore::Entering execution(org.aspectj.ajdt.internal.core.builder.AjBuildManager(IMessageHandler))
arguments (MessageHandler: no messages)
ajdtcore::Exiting execution(org.aspectj.ajdt.internal.core.builder.AjBuildManager(IMessageHandler))
// call do-command - this handles both one-off and incremental
(repeat) compiles
ajdtcore::Entering execution(boolean org.aspectj.ajdt.ajc.AjdtCommand.doCommand(IMessageHandler, boolean))
arguments (MessageHandler: no
messages,false)
// create build configuration object for this build by
parsing command-line arguments
ajdtcore::Entering execution(AjBuildConfig org.aspectj.ajdt.ajc.AjdtCommand.genBuildConfig(String[],
CountingMessageHandler))
arguments ([Ljava.lang.String;@76cbf7,MessageHandler: no messages)
// create a build
arg parser, this is actually a subclass of the eclipse batch compiler
// which is org.eclipse.jdt.internal.compiler.batch.Main
ajdtcore::Entering execution(org.aspectj.ajdt.ajc.BuildArgParser()) arguments ()
ajdtcore::Exiting execution(org.aspectj.ajdt.ajc.BuildArgParser())
// ask the parser
to create the build configuration object
ajdtcore::Entering execution(AjBuildConfig org.aspectj.ajdt.ajc.BuildArgParser.genBuildConfig(
String[], IMessageHandler))
arguments ([Ljava.lang.String;@76cbf7,MessageHandler: no messages)
ajdtcore::Entering execution(org.aspectj.ajdt.internal.core.builder.AjBuildConfig()) arguments ()
ajdtcore::Exiting execution(org.aspectj.ajdt.internal.core.builder.AjBuildConfig())
ajdtcore::Entering execution(org.aspectj.ajdt.ajc.BuildArgParser.AjcConfigParser(
BuildArgParser, AjBuildConfig,
IMessageHandler))
arguments (org.aspectj.ajdt.ajc.BuildArgParser@126804e,
org.aspectj.ajdt.internal.core.builder.AjBuildConfig@b1b4c3,
MessageHandler: no messages)
ajdtcore::Exiting
execution(org.aspectj.ajdt.ajc.BuildArgParser.AjcConfigParser(
BuildArgParser, AjBuildConfig, IMessageHandler))
util::Entering execution(void org.aspectj.util.ConfigParser.parseCommandLine(String[]))
arguments ([Ljava.lang.String;@76cbf7)
// build a linked list of
arguments and then...
util::Entering execution(void org.aspectj.util.ConfigParser.parseArgs(LinkedList))
arguments ([org.aspectj.util.ConfigParser$Arg@72ffb])
// ajc options
are handled by BuildArgParser.AjcConfigParser.parseOption
// all other args (source
files, lst files, imported argfiles) are handled in ConfigParser superclass
util::Exiting execution(void org.aspectj.util.ConfigParser.parseArgs(LinkedList)) return: null
util::Exiting execution(void org.aspectj.util.ConfigParser.parseCommandLine(String[])) return: null
// get
the list of files to be compiled
util::Entering execution(List org.aspectj.util.ConfigParser.getFiles()) arguments ()
util::Exiting execution(List org.aspectj.util.ConfigParser.getFiles()) return:
[C:\Documents and
Settings\colyer\Hello.java]
// get any remaining arguments...
these will be passed up to the eclipse batch compiler
ajdtcore::Entering execution(List org.aspectj.ajdt.ajc.BuildArgParser.AjcConfigParser.getUnparsedArgs())
arguments ()
ajdtcore::Exiting execution(List org.aspectj.ajdt.ajc.BuildArgParser.AjcConfigParser.getUnparsedArgs())
return: []
// configure the batch compiler
(superclass) with any as yet unparsed args
jdtcore::Entering execution(void org.eclipse.jdt.internal.compiler.batch.Main.configure(String[]))
arguments ([Ljava.lang.String;@1df38fd)
jdtcore::Exiting execution(void org.eclipse.jdt.internal.compiler.batch.Main.configure(String[]))
return: null
// tell the AjBuildConfig what it has to
build
ajdtcore::Entering execution(void org.aspectj.ajdt.internal.core.builder.AjBuildConfig.setFiles(List))
arguments ([C:\Documents and Settings\colyer\Hello.java])
ajdtcore::Exiting execution(void org.aspectj.ajdt.internal.core.builder.AjBuildConfig.setFiles(List))
return: null
// calculate the
classpath for compilation
ajdtcore::Entering execution(List org.aspectj.ajdt.ajc.BuildArgParser.getClasspath(
BuildArgParser.AjcConfigParser))
arguments (org.aspectj.ajdt.ajc.BuildArgParser$AjcConfigParser@126e85f)
...
ajdtcore::Exiting execution(List org.aspectj.ajdt.ajc.BuildArgParser.getClasspath(
BuildArgParser.AjcConfigParser))
return:
[C:\ColyerRoot\Programs\SunJDK141\jre\lib\rt.jar,
C:\ColyerRoot\Programs\SunJDK141\jre\lib\i18n.jar,
C:\ColyerRoot\Programs\SunJDK141\jre\lib\sunrsasign.jar,
C:\ColyerRoot\Programs\SunJDK141\jre\lib\jsse.jar,
C:\ColyerRoot\Programs\SunJDK141\jre\lib\jce.jar,
C:\ColyerRoot\Programs\SunJDK141\jre\lib\charsets.jar,
C:\ColyerRoot\Programs\SunJDK141\jre\classes,
C:\ColyerRoot\Programs\SunJDK141\jre\lib\ext\aspectjrt.jar,
C:\ColyerRoot\Programs\SunJDK141\jre\lib\ext\dnsns.jar,
C:\ColyerRoot\Programs\SunJDK141\jre\lib\ext\ldapsec.jar,
C:\ColyerRoot\Programs\SunJDK141\jre\lib\ext\localedata.jar,
C:\ColyerRoot\Programs\SunJDK141\jre\lib\ext\sunjce_provider.jar,
c:\ColyerRoot\Programs\aspectj1.1\lib\aspectjtools_g.jar,
c:\ColyerRoot\Programs\aspectj1.1\lib\aspectjtools.jar,
c:\ColyerRoot\Programs\aspectj1.1\lib\log4j-1.2.7.jar,
c:\ColyerRoot\Programs\aspectj1.1\lib,
.,
C:\ColyerRoot\Programs\aspectj1.1b4\lib\aspectjrt.jar]
// tell the build config what we
learnt...
ajdtcore::Entering execution(void org.aspectj.ajdt.internal.core.builder.AjBuildConfig.setClasspath(List))
arguments (...)
ajdtcore::Exiting execution(void org.aspectj.ajdt.internal.core.builder.AjBuildConfig.setClasspath(List))
return: null
// ensure we always generate
debug info at this phase
ajdtcore::Entering execution(void org.aspectj.ajdt.ajc.BuildArgParser.setDebugOptions()) arguments ()
ajdtcore::Exiting execution(void org.aspectj.ajdt.ajc.BuildArgParser.setDebugOptions()) return: null
// give the build config the java options
that were parsed by the eclipse batch compiler
ajdtcore::Entering execution(void org.aspectj.ajdt.internal.core.builder.AjBuildConfig.setJavaOptions(Map))
arguments ( {org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=ignore,
org.eclipse.jdt.core.compiler.compliance=1.3,
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled,
org.eclipse.jdt.core.compiler.codegen.unusedLocal=optimize out,
org.eclipse.jdt.core.compiler.problem.deprecation=ignore,
org.eclipse.jdt.core.compiler.problem.
unusedParameterWhenImplementingAbstract=disabled,
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore,
org.eclipse.jdt.core.compiler.problem.unusedLocal=ignore,
org.eclipse.jdt.core.compiler.problem.unusedImport=ignore,
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=ignore,
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore,
org.eclipse.jdt.core.compiler.debug.localVariable=generate,
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=ignore,
org.eclipse.jdt.core.compiler.debug.sourceFile=generate,
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=ignore,
org.eclipse.jdt.core.compiler.debug.lineNumber=generate,
org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore,
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=ignore,
org.eclipse.jdt.core.compiler.problem.assertIdentifier=ignore,
org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=ignore,
org.eclipse.jdt.core.compiler.problem.invalidImport=error,
org.eclipse.jdt.core.compiler.problem.unreachableCode=error,
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.1,
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=ignore,
org.eclipse.jdt.core.compiler.source=1.3})
ajdtcore::Exiting execution(void org.aspectj.ajdt.internal.core.builder.AjBuildConfig.setJavaOptions(Map))
return: null
ajdtcore::Exiting execution(AjBuildConfig org.aspectj.ajdt.ajc.BuildArgParser.genBuildConfig(
String[], IMessageHandler))
return:
org.aspectj.ajdt.internal.core.builder.AjBuildConfig@b1b4c3
ajdtcore::Exiting execution(AjBuildConfig
org.aspectj.ajdt.ajc.AjdtCommand.genBuildConfig(
String[], CountingMessageHandler))
return: org.aspectj.ajdt.internal.core.builder.AjBuildConfig@b1b4c3
//
------------------------------------------------------------------------------------------
// here we go... kick off a batch
build, if we were in incremental mode this would be a call
// to AjBuildManager.incrementalBuild()
instead
//
------------------------------------------------------------------------------------------
ajdtcore::Entering execution(boolean org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(
AjBuildConfig, IMessageHandler))
arguments (org.aspectj.ajdt.internal.core.builder.AjBuildConfig@b1b4c3,
MessageHandler: no messages)
// *********************************************
// what happens here is captured separately!!
// see ajc_batchBuild_annotated.htm
// *********************************************
ajdtcore::Exiting execution(boolean org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(
AjBuildConfig, IMessageHandler))
return: true
ajdtcore::Exiting execution(boolean org.aspectj.ajdt.ajc.AjdtCommand.doCommand(IMessageHandler, boolean))
return: true
ajdtcore::Exiting execution(boolean org.aspectj.ajdt.ajc.AjdtCommand.runCommand(String[], IMessageHandler))
return: true
// and we're back in Main.run()...
// report the results of the compilation
ajdtcore::Entering execution(boolean org.aspectj.tools.ajc.Main.report(boolean, IMessageHolder))
arguments (true,MessageHandler: no messages)
ajdtcore::Exiting execution(boolean org.aspectj.tools.ajc.Main.report(boolean, IMessageHolder))
return: true
ajdtcore::Exiting execution(void org.aspectj.tools.ajc.Main.run(String[], IMessageHolder)) return: null
ajdtcore::Entering execution(void org.aspectj.tools.ajc.Main.systemExit(IMessageHolder))
arguments (MessageHandler: no messages)
// its all over!