]> source.dussan.org Git - aspectj.git/commitdiff
249551: cleanup by default
authoraclement <aclement>
Fri, 3 Oct 2008 02:10:29 +0000 (02:10 +0000)
committeraclement <aclement>
Fri, 3 Oct 2008 02:10:29 +0000 (02:10 +0000)
ajde.core/src/org/aspectj/ajde/core/AjCompiler.java
ajde.core/src/org/aspectj/ajde/core/internal/AjdeCoreBuildManager.java

index 221f0b58caf07fe50bf410950f43512b0a1d0565..758073d83575d8c35cedd46835c1ea39e16ca5de 100644 (file)
@@ -27,11 +27,11 @@ import org.aspectj.org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
  */
 public class AjCompiler {
 
-       private String compilerId;
-       private ICompilerConfiguration compilerConfig;
-       private IBuildProgressMonitor monitor;
-       private IBuildMessageHandler handler;
-       private AjdeCoreBuildManager buildManager;
+       private final String compilerId;
+       private final ICompilerConfiguration compilerConfig;
+       private final IBuildProgressMonitor monitor;
+       private final IBuildMessageHandler handler;
+       private final AjdeCoreBuildManager buildManager;
 
        /**
         * Creates a new AjCompiler for the given id, ICompilerConfiguration, IBuildProgressMonitor and IBuildMessageHandler. None of
@@ -88,6 +88,13 @@ public class AjCompiler {
                }
        }
 
+       /**
+        * Cleanup the compiler instance, ready for removal.
+        */
+       public void cleanup() {
+               buildManager.cleanup();
+       }
+
        /**
         * Perform a full build.
         */
index b4de526f3668fd73e18183686a816022d42e6078..c22248f46379ecf6c1710420e3108f60195a652d 100644 (file)
@@ -45,10 +45,10 @@ import org.aspectj.util.LangUtil;
  */
 public class AjdeCoreBuildManager {
 
-       private AjCompiler compiler;
+       private final AjCompiler compiler;
        private AjdeCoreBuildNotifierAdapter buildEventNotifier = null;
-       private AjBuildManager ajBuildManager;
-       private IMessageHandler msgHandlerAdapter;
+       private final AjBuildManager ajBuildManager;
+       private final IMessageHandler msgHandlerAdapter;
 
        public AjdeCoreBuildManager(AjCompiler compiler) {
                this.compiler = compiler;
@@ -390,4 +390,8 @@ public class AjdeCoreBuildManager {
        public Object getCustomMungerFactory() {
                return ajBuildManager.getCustomMungerFactory();
        }
+
+       public void cleanup() {
+               ajBuildManager.cleanup();
+       }
 }