summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraclement <aclement>2010-06-11 19:13:54 +0000
committeraclement <aclement>2010-06-11 19:13:54 +0000
commitb666bd033fd9df5b73ab8e20cfa34d4f68b53f9b (patch)
tree79a0a5d0c879a39c598c37f32730a29f4e3916dd
parent263a678094115922af081cad32aa059fd62cb8d1 (diff)
downloadaspectj-b666bd033fd9df5b73ab8e20cfa34d4f68b53f9b.tar.gz
aspectj-b666bd033fd9df5b73ab8e20cfa34d4f68b53f9b.zip
itd inners: new helper
-rw-r--r--org.aspectj.matcher/src/org/aspectj/weaver/CrosscuttingMembersSet.java26
1 files changed, 25 insertions, 1 deletions
diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/CrosscuttingMembersSet.java b/org.aspectj.matcher/src/org/aspectj/weaver/CrosscuttingMembersSet.java
index 06c1c6fa2..e321e222d 100644
--- a/org.aspectj.matcher/src/org/aspectj/weaver/CrosscuttingMembersSet.java
+++ b/org.aspectj.matcher/src/org/aspectj/weaver/CrosscuttingMembersSet.java
@@ -14,6 +14,7 @@ package org.aspectj.weaver;
import java.io.IOException;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
@@ -214,6 +215,29 @@ public class CrosscuttingMembersSet {
}
/**
+ * Retrieve a subset of all known mungers, those of a specific kind.
+ *
+ * @param kind the kind of munger requested
+ * @return a list of those mungers (list is empty if none found)
+ */
+ public List<ConcreteTypeMunger> getTypeMungersOfKind(ResolvedTypeMunger.Kind kind) {
+ List<ConcreteTypeMunger> collected = null;
+ for (ConcreteTypeMunger typeMunger : typeMungers) {
+ if (typeMunger.getMunger() != null && typeMunger.getMunger().getKind() == kind) {
+ if (collected == null) {
+ collected = new ArrayList<ConcreteTypeMunger>();
+ }
+ collected.add(typeMunger);
+ }
+ }
+ if (collected == null) {
+ return Collections.emptyList();
+ } else {
+ return collected;
+ }
+ }
+
+ /**
* Determine if the type munger is: (1) for privileged access (2) for a normally non visible field (3) is from an aspect wanting
* 'old style' (ie. long) accessor names
*/
@@ -298,7 +322,7 @@ public class CrosscuttingMembersSet {
}
declareAnnotationOnMethods = new ArrayList<DeclareAnnotation>();
declareAnnotationOnMethods.addAll(ret);
- //world.sortDeclareAnnotations(declareAnnotationOnMethods);
+ // world.sortDeclareAnnotations(declareAnnotationOnMethods);
}
return declareAnnotationOnMethods;
}