Package org.aspectj.ajde.core
Class AjCompiler
java.lang.Object
org.aspectj.ajde.core.AjCompiler
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.
-
Constructor Summary
ConstructorDescriptionAjCompiler
(String compilerId, ICompilerConfiguration compilerConfig, IBuildProgressMonitor buildProgressMonitor, IBuildMessageHandler buildMessageHandler) Creates a new AjCompiler for the given id, ICompilerConfiguration, IBuildProgressMonitor and IBuildMessageHandler. -
Method Summary
Modifier and TypeMethodDescriptionboolean
addDependencies
(File file, String[] typeNameDependencies) void
build()
Perform an incremental build if possible, otherwise it will default to a full build.void
Perform a full build.void
Clear the incremental state associated with this AjCompiler from the IncrementalStateManager.getId()
getModel()
boolean
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.
-
Constructor Details
-
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.- Parameters:
compilerId
- - Unique String used to identify this AjCompilercompilerConfig
- - ICompilerConfiguration implementationbuildProgressMonitor
- - IBuildProgressMonitor implementationbuildMessageHandler
- - IBuildMessageHandler implementation
-
-
Method Details
-
getId
- Returns:
- the id for this AjCompiler
-
getCompilerConfiguration
- Returns:
- the ICompilerConfiguration associated with this AjCompiler
-
getBuildProgressMonitor
- Returns:
- the IBuildProgressMonitor associated with this AjCompiler
-
getMessageHandler
- Returns:
- 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
-
isJava6Compatible
public boolean isJava6Compatible()- Returns:
- true if the underlying version of the compiler is compatible with Java 6, returns false otherwise.
-
setCustomMungerFactory
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.- Parameters:
factory
-
-
getCustomMungerFactory
- Returns:
- 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
-
getBuildManager
-