aboutsummaryrefslogtreecommitdiffstats
path: root/asm
diff options
context:
space:
mode:
authoraclement <aclement>2005-03-10 17:22:08 +0000
committeraclement <aclement>2005-03-10 17:22:08 +0000
commit08fdf0bb14548f6ec39f118c84e939dde4092219 (patch)
tree183ef691e13088b2c65c5f11b9462f897255cbfe /asm
parentca004fd36e4280bfb78b58c37fcb1b6dfcbdb223 (diff)
downloadaspectj-08fdf0bb14548f6ec39f118c84e939dde4092219.tar.gz
aspectj-08fdf0bb14548f6ec39f118c84e939dde4092219.zip
Declare annotation: guard added for model building... (perf improvement!)
Diffstat (limited to 'asm')
-rw-r--r--asm/src/org/aspectj/asm/AsmManager.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/asm/src/org/aspectj/asm/AsmManager.java b/asm/src/org/aspectj/asm/AsmManager.java
index 60645f3b0..9422d5f1e 100644
--- a/asm/src/org/aspectj/asm/AsmManager.java
+++ b/asm/src/org/aspectj/asm/AsmManager.java
@@ -8,6 +8,7 @@
*
* Contributors:
* Mik Kersten initial implementation
+ * Andy Clement incremental support and switch on/off state
* ******************************************************************/
@@ -37,6 +38,7 @@ public class AsmManager {
protected IHierarchy hierarchy;
private List structureListeners = new ArrayList();
private IRelationshipMap mapper;
+ private static boolean creatingModel = false;
public static boolean attemptIncrementalModelRepairs = false;
@@ -780,6 +782,21 @@ public class AsmManager {
AsmManager.getDefault().getRelationshipMap());
}
}
+
+ /**
+ * Set to indicate whether we are currently building a structure model, should
+ * be set up front.
+ */
+ public static void setCreatingModel(boolean b) {
+ creatingModel = b;
+ }
+
+ /**
+ * returns true if we are currently generating a structure model, enables
+ * guarding of expensive operations on an empty/null model.
+ */
+ public static boolean isCreatingModel() { return creatingModel;}
+
}