diff options
author | acolyer <acolyer> | 2006-02-10 17:56:44 +0000 |
---|---|---|
committer | acolyer <acolyer> | 2006-02-10 17:56:44 +0000 |
commit | ce08d1423fd1526a36d36aacb7b30f4c6adc2647 (patch) | |
tree | cd9c2ad83cd0ad068e4f783bae5d50489ba747b6 /weaver/src | |
parent | 1c26c6cc4885648ccb398b16daf3c387740f8952 (diff) | |
download | aspectj-ce08d1423fd1526a36d36aacb7b30f4c6adc2647.tar.gz aspectj-ce08d1423fd1526a36d36aacb7b30f4c6adc2647.zip |
provide a way to reset dump state to free up memory
Diffstat (limited to 'weaver/src')
-rw-r--r-- | weaver/src/org/aspectj/weaver/Dump.java | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/weaver/src/org/aspectj/weaver/Dump.java b/weaver/src/org/aspectj/weaver/Dump.java index ceeae0473..2d3c6c93f 100644 --- a/weaver/src/org/aspectj/weaver/Dump.java +++ b/weaver/src/org/aspectj/weaver/Dump.java @@ -59,6 +59,28 @@ public class Dump { private static Map nodes = new HashMap(); private static String lastDumpFileName = UNKNOWN_FILENAME; + private static boolean preserveOnNextReset = false; + + /** + * for testing only, so that we can verify dump contents + * after compilation has completely finished + */ + public static void preserveOnNextReset() { + preserveOnNextReset = true; + } + + public static void reset() { + if (preserveOnNextReset) { + preserveOnNextReset = false; + return; + } + else { + Dump.nodes = new HashMap(); + Dump.savedMessageHolder = null; + } + } + + /* * Dump methods */ @@ -372,4 +394,5 @@ public class Dump { public void visitString (String s); public void visitList (List list); } + } |