aboutsummaryrefslogtreecommitdiffstats
path: root/org.aspectj.matcher
diff options
context:
space:
mode:
authorAndy Clement <aclement@gopivotal.com>2014-03-18 22:21:20 -0700
committerAndy Clement <aclement@gopivotal.com>2014-03-18 22:21:20 -0700
commitc1c4a4d41f3173bb72040d91d42d07662ab703bd (patch)
treeee5f5bb17e86908b93504db85d2886e0375a94c5 /org.aspectj.matcher
parentbedb85ee870c2c0dad34d68662c83ff7033dd746 (diff)
downloadaspectj-c1c4a4d41f3173bb72040d91d42d07662ab703bd.tar.gz
aspectj-c1c4a4d41f3173bb72040d91d42d07662ab703bd.zip
merging 1.7.4 fixes into 1.8.0
Diffstat (limited to 'org.aspectj.matcher')
-rw-r--r--org.aspectj.matcher/src/org/aspectj/weaver/Checker.java16
-rw-r--r--org.aspectj.matcher/src/org/aspectj/weaver/Lint.java12
2 files changed, 28 insertions, 0 deletions
diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/Checker.java b/org.aspectj.matcher/src/org/aspectj/weaver/Checker.java
index 384c5d6cd..4a765a9e5 100644
--- a/org.aspectj.matcher/src/org/aspectj/weaver/Checker.java
+++ b/org.aspectj.matcher/src/org/aspectj/weaver/Checker.java
@@ -222,6 +222,22 @@ public class Checker extends ShadowMunger {
return shadow.toString();
} else if (key.equalsIgnoreCase("joinpoint.kind")) {
return shadow.getKind().getName();
+ } else if (key.equalsIgnoreCase("joinpoint.enclosingclass")) {
+ return shadow.getEnclosingType().getName();
+ } else if (key.equalsIgnoreCase("joinpoint.enclosingmember.name")) {
+ Member member = shadow.getEnclosingCodeSignature();
+ if (member==null) {
+ return "";
+ } else {
+ return member.getName();
+ }
+ } else if (key.equalsIgnoreCase("joinpoint.enclosingmember")) {
+ Member member = shadow.getEnclosingCodeSignature();
+ if (member==null) {
+ return "";
+ } else {
+ return member.toString();
+ }
} else if (key.equalsIgnoreCase("joinpoint.signature")) {
return shadow.getSignature().toString();
} else if (key.equalsIgnoreCase("joinpoint.signature.declaringtype")) {
diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/Lint.java b/org.aspectj.matcher/src/org/aspectj/weaver/Lint.java
index d68ce4142..36d647512 100644
--- a/org.aspectj.matcher/src/org/aspectj/weaver/Lint.java
+++ b/org.aspectj.matcher/src/org/aspectj/weaver/Lint.java
@@ -166,6 +166,18 @@ public class Lint {
kind.setKind(messageKind);
}
}
+
+ public void setFromMap(Map<String,String> lintOptionsMap) {
+ for (String key: lintOptionsMap.keySet()) {
+ String value = lintOptionsMap.get(key);
+ Kind kind = kinds.get(key);
+ if (kind == null) {
+ MessageUtil.error(world.getMessageHandler(), WeaverMessages.format(WeaverMessages.XLINT_KEY_ERROR, key));
+ } else {
+ kind.setKind(getMessageKind(value));
+ }
+ }
+ }
public void setFromProperties(File file) {
if (trace.isTraceEnabled()) {