Klasse AjdtCommand

java.lang.Object
org.aspectj.ajdt.ajc.AjdtCommand
Alle implementierten Schnittstellen:
ICommand

public class AjdtCommand extends Object implements ICommand
ICommand adapter for the AspectJ compiler. Not thread-safe.
  • Felddetails

    • ABORT_MESSAGE

      public static final String ABORT_MESSAGE
      Message String for any AbortException thrown from ICommand API's
      Siehe auch:
  • Konstruktordetails

    • AjdtCommand

      public AjdtCommand()
  • Methodendetails

    • runCommand

      public boolean runCommand(String[] args, IMessageHandler handler)
      Run AspectJ compiler, wrapping any exceptions thrown as ABORT messages (containing ABORT_MESSAGE String).
      Angegeben von:
      runCommand in Schnittstelle ICommand
      Parameter:
      args - the String[] for the compiler
      handler - the IMessageHandler for any messages
      Gibt zurück:
      false if handler has errors or the command failed
      Siehe auch:
    • repeatCommand

      public boolean repeatCommand(IMessageHandler handler)
      Run AspectJ compiler, wrapping any exceptions thrown as ABORT messages (containing ABORT_MESSAGE String).
      Angegeben von:
      repeatCommand in Schnittstelle ICommand
      Parameter:
      handler - the IMessageHandler for any messages
      Gibt zurück:
      false if handler has errors or the command failed
      Siehe auch:
    • doCommand

      protected boolean doCommand(IMessageHandler handler, boolean repeat)
      Delegate of both runCommand and repeatCommand. This invokes the argument parser each time (even when repeating). If the parser detects errors, this signals an abort with the usage message and returns false.
      Parameter:
      handler - the IMessageHandler sink for any messages
      repeat - if true, do incremental build, else do batch build
      Gibt zurück:
      false if handler has any errors or command failed
    • genBuildConfig

      public static AjBuildConfig genBuildConfig(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.
    • inferKind

      protected static IMessage.Kind inferKind(String message)
      Heuristically infer the type of output message logged by the AspectJ compiler. This is a simple keyword matcher looking for substrings like "[error]", "[warning]", "AspectJ-specific options:", "AspectJ-specific non-standard options:", "Warning options:".
      Parameter:
      message - AspectJ compiler message
      Gibt zurück:
      inferred message kind, either of ERROR, WARNING, USAGE, INFO