aboutsummaryrefslogtreecommitdiffstats
path: root/org.aspectj.matcher
diff options
context:
space:
mode:
authoraclement <aclement>2010-01-22 19:05:23 +0000
committeraclement <aclement>2010-01-22 19:05:23 +0000
commit9fe3fe74251d625ae82dd58f4a05de63d12cc211 (patch)
tree738edc5a3c89fb3825690f3ad11691035baad37e /org.aspectj.matcher
parentce191a75add393b5e9af702f062bf77d1062560b (diff)
downloadaspectj-9fe3fe74251d625ae82dd58f4a05de63d12cc211.tar.gz
aspectj-9fe3fe74251d625ae82dd58f4a05de63d12cc211.zip
299552: private ITD fields stay private in target (with unmangled name): itdVersion property on world, set via -Xset:itdVersion=1/2
Diffstat (limited to 'org.aspectj.matcher')
-rw-r--r--org.aspectj.matcher/src/org/aspectj/weaver/World.java23
1 files changed, 23 insertions, 0 deletions
diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/World.java b/org.aspectj.matcher/src/org/aspectj/weaver/World.java
index e07cd8497..a16b38f72 100644
--- a/org.aspectj.matcher/src/org/aspectj/weaver/World.java
+++ b/org.aspectj.matcher/src/org/aspectj/weaver/World.java
@@ -133,6 +133,7 @@ public abstract class World implements Dump.INode {
private boolean shouldGenerateStackMaps = false;
protected boolean bcelRepositoryCaching = xsetBCEL_REPOSITORY_CACHING_DEFAULT.equalsIgnoreCase("true");
private boolean fastMethodPacking = false;
+ private int itdVersion = 2; // defaults to 2nd generation itds
private boolean completeBinaryTypes = false;
private boolean overWeaving = false;
public boolean forDEBUG_structuralChangesCode = false;
@@ -892,6 +893,10 @@ public abstract class World implements Dump.INode {
public final static String xsetOPTIMIZED_MATCHING = "optimizedMatching";
public final static String xsetTIMERS_PER_JOINPOINT = "timersPerJoinpoint";
public final static String xsetTIMERS_PER_FASTMATCH_CALL = "timersPerFastMatchCall";
+ public final static String xsetITD_VERSION = "itdVersion";
+ public final static String xsetITD_VERSION_ORIGINAL = "1";
+ public final static String xsetITD_VERSION_2NDGEN = "2";
+ public final static String xsetITD_VERSION_DEFAULT = xsetITD_VERSION_2NDGEN;
public boolean isInJava5Mode() {
return behaveInJava5Way;
@@ -1359,6 +1364,14 @@ public abstract class World implements Dump.INode {
.info("[bcelRepositoryCaching=false] AspectJ will not use a bcel cache for class information"));
}
+ // ITD Versions
+ // 1 is the first version in use up to AspectJ 1.6.8
+ // 2 is from 1.6.9 onwards
+ s = p.getProperty(xsetITD_VERSION, xsetITD_VERSION_DEFAULT);
+ if (s.equals(xsetITD_VERSION_ORIGINAL)) {
+ itdVersion = 1;
+ }
+
s = p.getProperty(xsetFAST_PACK_METHODS, "true");
fastMethodPacking = s.equalsIgnoreCase("true");
@@ -1741,4 +1754,14 @@ public abstract class World implements Dump.INode {
ResolvedType.resetPrimitives();
}
+ /**
+ * Returns the version of ITD that this world wants to create. The default is the new style (2) but in some cases where there
+ * might be a clash, the old style can be used. It is set through the option -Xset:itdVersion=1
+ *
+ * @return the ITD version this world wants to create - 1=oldstyle 2=new, transparent style
+ */
+ public int getItdVersion() {
+ return itdVersion;
+ }
+
} \ No newline at end of file