org.aspectj.ajdt.ajc
Class AjdtCommand

java.lang.Object
  extended by org.aspectj.ajdt.ajc.AjdtCommand
All Implemented Interfaces:
ICommand

public class AjdtCommand
extends java.lang.Object
implements ICommand

ICommand adapter for the AspectJ compiler. Not thread-safe.


Field Summary
static java.lang.String ABORT_MESSAGE
          Message String for any AbortException thrown from ICommand API's
 
Constructor Summary
AjdtCommand()
           
 
Method Summary
static AjBuildConfig genBuildConfig(java.lang.String[] args, CountingMessageHandler handler)
          This creates a build configuration for the arguments.
 boolean repeatCommand(IMessageHandler handler)
          Run AspectJ compiler, wrapping any exceptions thrown as ABORT messages (containing ABORT_MESSAGE String).
 boolean runCommand(java.lang.String[] args, IMessageHandler handler)
          Run AspectJ compiler, wrapping any exceptions thrown as ABORT messages (containing ABORT_MESSAGE String).
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ABORT_MESSAGE

public static final java.lang.String ABORT_MESSAGE
Message String for any AbortException thrown from ICommand API's

See Also:
Constant Field Values
Constructor Detail

AjdtCommand

public AjdtCommand()
Method Detail

runCommand

public boolean runCommand(java.lang.String[] args,
                          IMessageHandler handler)
Run AspectJ compiler, wrapping any exceptions thrown as ABORT messages (containing ABORT_MESSAGE String).

Specified by:
runCommand in interface ICommand
Parameters:
args - the String[] for the compiler
handler - the IMessageHandler for any messages
Returns:
false if handler has errors or the command failed
See Also:
ICommand.runCommand(String[], IMessageHandler)

repeatCommand

public boolean repeatCommand(IMessageHandler handler)
Run AspectJ compiler, wrapping any exceptions thrown as ABORT messages (containing ABORT_MESSAGE String).

Specified by:
repeatCommand in interface ICommand
Parameters:
handler - the IMessageHandler for any messages
Returns:
false if handler has errors or the command failed
See Also:
ICommand.repeatCommand(IMessageHandler)

genBuildConfig

public static AjBuildConfig genBuildConfig(java.lang.String[] args,
                                           CountingMessageHandler handler)
This creates a build configuration for the arguments. Errors reported to the handler:
  1. The parser detects some directly
  2. The parser grabs some from the error stream emitted by its superclass
  3. The configuration has a self-test
In the latter two cases, the errors do not have a source location context for locating the error.