diff options
author | aclement <aclement> | 2010-01-19 18:47:37 +0000 |
---|---|---|
committer | aclement <aclement> | 2010-01-19 18:47:37 +0000 |
commit | 7199cc27214344dab99f1902c7f2a528264f12d4 (patch) | |
tree | df1047acf6dea8a8981411ec3e430857d7880d86 | |
parent | 6082a97caf37b26c3cd4acb31a6f0671a4f87995 (diff) | |
download | aspectj-7199cc27214344dab99f1902c7f2a528264f12d4.tar.gz aspectj-7199cc27214344dab99f1902c7f2a528264f12d4.zip |
refactoring
-rw-r--r-- | org.aspectj.matcher/src/org/aspectj/weaver/CrosscuttingMembers.java | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/CrosscuttingMembers.java b/org.aspectj.matcher/src/org/aspectj/weaver/CrosscuttingMembers.java index 2bf8f0f48..3ff22daa0 100644 --- a/org.aspectj.matcher/src/org/aspectj/weaver/CrosscuttingMembers.java +++ b/org.aspectj.matcher/src/org/aspectj/weaver/CrosscuttingMembers.java @@ -145,8 +145,9 @@ public class CrosscuttingMembers { // FIXME asc perf Possible Improvement. Investigate why this is // called twice in a weave ? DeclareAnnotation da = (DeclareAnnotation) declare; - if (da.getAspect() == null) + if (da.getAspect() == null) { da.setAspect(inAspect); + } if (da.isDeclareAtType()) { declareAnnotationsOnType.add(da); } else if (da.isDeclareAtField()) { @@ -166,8 +167,9 @@ public class CrosscuttingMembers { } public void exposeType(UnresolvedType typeToExpose) { - if (ResolvedType.isMissing(typeToExpose)) + if (ResolvedType.isMissing(typeToExpose)) { return; + } if (typeToExpose.isParameterizedType() || typeToExpose.isRawType()) { if (typeToExpose instanceof ResolvedType) { typeToExpose = ((ResolvedType) typeToExpose).getGenericType(); @@ -182,8 +184,9 @@ public class CrosscuttingMembers { ResolvedTypeMunger rTM = cTM.getMunger(); if (rTM != null && rTM instanceof ExposeTypeMunger) { String exposedType = ((ExposeTypeMunger) rTM).getExposedTypeSignature(); - if (exposedType.equals(signatureToLookFor)) + if (exposedType.equals(signatureToLookFor)) { return; // dont need to bother + } } } addTypeMunger(world.getWeavingSupport().concreteTypeMunger(new ExposeTypeMunger(typeToExpose), inAspect)); @@ -194,17 +197,12 @@ public class CrosscuttingMembers { // new PrivilegedAccessMunger(member), inAspect)); } - public void addPrivilegedAccesses(Collection accessedMembers) { - for (Iterator i = accessedMembers.iterator(); i.hasNext();) { - addPrivilegedAccess((ResolvedMember) i.next()); + public void addPrivilegedAccesses(Collection<ResolvedMember> accessedMembers) { + for (ResolvedMember member : accessedMembers) { + addTypeMunger(world.getWeavingSupport().concreteTypeMunger(new PrivilegedAccessMunger(member), inAspect)); } } - private void addPrivilegedAccess(ResolvedMember member) { - // System.err.println("add priv access: " + member); - addTypeMunger(world.getWeavingSupport().concreteTypeMunger(new PrivilegedAccessMunger(member), inAspect)); - } - public Collection<ShadowMunger> getCflowEntries() { List<ShadowMunger> ret = new ArrayList<ShadowMunger>(); for (ShadowMunger m : shadowMungers) { @@ -370,8 +368,9 @@ public class CrosscuttingMembers { } } } - if (!foundInOtherSet) + if (!foundInOtherSet) { foundInequality = true; + } } if (foundInequality) { // System.out.println("type munger change"); |