Class CompilerWrapper
java.lang.Object
org.aspectj.tools.ajc.Main
org.aspectj.tools.ajdoc.CompilerWrapper
Wrapper for ajdoc's use of the AspectJ compiler.
- Author:
- Mik Kersten
-
Nested Class Summary
Nested classes/interfaces inherited from class Main
Main.CommandController, Main.LogModeMessagePrinter, Main.MessagePrinterModifier and TypeClassDescriptionstatic classcontroller for repeatable command delays until input or file changed or removedstatic classstatic classinterceptor IMessageHandler to print as we go. -
Field Summary
Fields inherited from class Main
command, commandName, controller, ourHandler, THROWN_PREFIXModifier and TypeFieldDescriptionprotected ICommandprotected StringReflectionFactory identifier for command (compiler)protected Main.CommandControllercontrol iteration/continuation for command (compiler)protected final MessageHandlerinternally-set message sinkstatic final StringHeader used when rendering exceptions for users -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic AsmManagerexecuteMain(String[] args) static IMessage[]static booleanMethods inherited from class Main
bareMain, fail, getHolder, getMessageHandler, main, outMessage, quit, renderExceptionForUser, report, run, runMain, setCommand, setCompletionRunner, setHolder, systemExitModifier and TypeMethodDescriptionstatic intbareMain(String[] args, boolean useSystemExit, List<String> fails, List<String> errors, List<String> warnings, List<String> infos, List<String> usages) Convenience method to run ajc and collect String lists of messages.protected static voidfail(IMessageHandler handler, String message, Throwable thrown) convenience API to make fail messages (without MessageUtils's fail prefix)static voidprotected voidoutMessage(String message) Messages to the uservoidquit()call this to stop after the next iteration of incremental compilestatic StringrenderExceptionForUser(Throwable thrown) protected booleanreport(boolean pass, IMessageHolder holder) Report results from a (possibly-incremental) compile run.voidrun(String[] args, IMessageHolder holder) Run without using System.exit(..), putting all messages in holder: ERROR: compiler error WARNING: compiler warning FAIL: command error (bad arguments, exception thrown) This handles incremental behavior: If args include "-incremental", repeat for every input char until 'q' is entered.voidRun without throwing exceptions, but optionally usingSystem.exit(int).voidsetCommand(ICommand command) voidsetCompletionRunner(Runnable runner) Install a Runnable to be invoked synchronously after each compile completes.voidsetHolder(IMessageHolder holder) Set holder to be passed all messages.protected voidCall System.exit(int) with values derived from the number of failures/aborts or errors in messages.
-
Constructor Details
-
CompilerWrapper
public CompilerWrapper()
-
-
Method Details
-
executeMain
-
hasErrors
public static boolean hasErrors() -
getErrors
-