Klasse AjCompiler

java.lang.Object
org.aspectj.ajde.core.AjCompiler

public class AjCompiler extends Object
The class to be used by tools to drive a build. An AjCompiler is created with a unique id (for example the absolute pathname of a project or .lst file) along with implementations of ICompilerConfiguration, IBuildProgressMonitor and IBuildMessageHandler. Tools then call build() or buildFresh() on this AjCompiler.

An AjCompiler is associated with one id, therefore a new one needs to be created for a new id (project, .lst file etc.). It is the responsibility of the tools to manage the lifecycle of the AjCompiler's.

  • Konstruktordetails

    • AjCompiler

      public AjCompiler(String compilerId, ICompilerConfiguration compilerConfig, IBuildProgressMonitor buildProgressMonitor, IBuildMessageHandler buildMessageHandler)
      Creates a new AjCompiler for the given id, ICompilerConfiguration, IBuildProgressMonitor and IBuildMessageHandler. None of the arguments can be null.
      Parameter:
      compilerId - - Unique String used to identify this AjCompiler
      compilerConfig - - ICompilerConfiguration implementation
      buildProgressMonitor - - IBuildProgressMonitor implementation
      buildMessageHandler - - IBuildMessageHandler implementation
  • Methodendetails

    • getId

      public String getId()
      Gibt zurück:
      the id for this AjCompiler
    • getCompilerConfiguration

      public ICompilerConfiguration getCompilerConfiguration()
      Gibt zurück:
      the ICompilerConfiguration associated with this AjCompiler
    • getBuildProgressMonitor

      public IBuildProgressMonitor getBuildProgressMonitor()
      Gibt zurück:
      the IBuildProgressMonitor associated with this AjCompiler
    • getMessageHandler

      public IBuildMessageHandler getMessageHandler()
      Gibt zurück:
      the IBuildMessageHandler associated with this AjCompiler
    • build

      public void build()
      Perform an incremental build if possible, otherwise it will default to a full build.
    • buildFresh

      public void buildFresh()
      Perform a full build.
    • clearLastState

      public void clearLastState()
      Clear the incremental state associated with this AjCompiler from the IncrementalStateManager. This is necessary until AjState is reworked and there's an AjState associated with an AjCompiler rather than requiring a map of them. If the environment is not cleaned up then jar locks may be kept.
    • addDependencies

      public boolean addDependencies(File file, String[] typeNameDependencies)
    • isJava6Compatible

      public boolean isJava6Compatible()
      Gibt zurück:
      true if the underlying version of the compiler is compatible with Java 6, returns false otherwise.
    • setCustomMungerFactory

      public void setCustomMungerFactory(Object factory)
      Set a CustomMungerFactory to the compiler's weaver The type of factory should be org.aspectj.weaver.CustomMungerFactory but due to dependency problem of project ajde.core, it is Object for now.
      Parameter:
      factory -
    • getCustomMungerFactory

      public Object getCustomMungerFactory()
      Gibt zurück:
      the CustomMungerFactory from the compiler's weaver The return type should be org.aspectj.weaver.CustomMungerFactory but due to dependency problem of project ajde.core, it is Object for now.
    • getModel

      public AsmManager getModel()
    • getBuildManager

      public AjdeCoreBuildManager getBuildManager()