From: aclement Date: Tue, 17 Nov 2009 17:05:21 +0000 (+0000) Subject: move away from using helper methods on Member X-Git-Tag: V1_6_7~59 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b481476cdbb6bc2b884ff474ed61bdbbd57e52ff;p=aspectj.git move away from using helper methods on Member --- diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/JoinPointSignature.java b/org.aspectj.matcher/src/org/aspectj/weaver/JoinPointSignature.java index 7ccf5211a..128a0d739 100644 --- a/org.aspectj.matcher/src/org/aspectj/weaver/JoinPointSignature.java +++ b/org.aspectj.matcher/src/org/aspectj/weaver/JoinPointSignature.java @@ -280,10 +280,6 @@ public class JoinPointSignature implements ResolvedMember { return realMember.isStatic(); } - public boolean isPrivate() { - return realMember.isPrivate(); - } - public boolean canBeParameterized() { return realMember.canBeParameterized(); } diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/Member.java b/org.aspectj.matcher/src/org/aspectj/weaver/Member.java index f36650f4a..7425ab2ce 100644 --- a/org.aspectj.matcher/src/org/aspectj/weaver/Member.java +++ b/org.aspectj.matcher/src/org/aspectj/weaver/Member.java @@ -72,8 +72,6 @@ public interface Member extends Comparable { public boolean isStatic(); - public boolean isPrivate(); - /** * Returns true iff the member is generic (NOT parameterized) */ diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/ResolvedMemberImpl.java b/org.aspectj.matcher/src/org/aspectj/weaver/ResolvedMemberImpl.java index d83689a63..712e6f30b 100644 --- a/org.aspectj.matcher/src/org/aspectj/weaver/ResolvedMemberImpl.java +++ b/org.aspectj.matcher/src/org/aspectj/weaver/ResolvedMemberImpl.java @@ -626,7 +626,8 @@ public class ResolvedMemberImpl extends MemberImpl implements IHasPosition, Anno } public boolean isDefault() { - return !(isPublic() || isProtected() || isPrivate()); + int mods = getModifiers(); + return !(Modifier.isPublic(mods) || Modifier.isProtected(mods) || Modifier.isPrivate(mods)); } public boolean isVisible(ResolvedType fromType) { diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java b/org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java index e8ccefa65..c6b2b15b8 100644 --- a/org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java +++ b/org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java @@ -1893,7 +1893,7 @@ public abstract class ResolvedType extends UnresolvedType implements AnnotatedEl return false; } // now have to test that itdMember is visible from targetType - if (itdMember.isPrivate()) { + if (Modifier.isPrivate(itdMember.getModifiers())) { return false; } if (itdMember.isPublic()) { diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/patterns/ReferencePointcut.java b/org.aspectj.matcher/src/org/aspectj/weaver/patterns/ReferencePointcut.java index de58787b5..d9369b9a9 100644 --- a/org.aspectj.matcher/src/org/aspectj/weaver/patterns/ReferencePointcut.java +++ b/org.aspectj.matcher/src/org/aspectj/weaver/patterns/ReferencePointcut.java @@ -296,7 +296,7 @@ public class ReferencePointcut extends Pointcut { declaringType = searchStart; } pointcutDec = declaringType.findPointcut(name); - boolean foundMatchingPointcut = (pointcutDec != null && pointcutDec.isPrivate()); + boolean foundMatchingPointcut = (pointcutDec != null && Modifier.isPrivate(pointcutDec.getModifiers())); if (!foundMatchingPointcut) { pointcutDec = searchStart.findPointcut(name); if (pointcutDec == null) {