diff options
author | aclement <aclement> | 2005-01-04 21:08:48 +0000 |
---|---|---|
committer | aclement <aclement> | 2005-01-04 21:08:48 +0000 |
commit | 9da980ed5c7be54a6703fe9c44b7f0a1c88229b8 (patch) | |
tree | 040594c7502d7c66d95f0446faa5bb394840f964 /weaver | |
parent | 98976598593e8a1f89e9628e8fc11c7822b8e3d4 (diff) | |
download | aspectj-9da980ed5c7be54a6703fe9c44b7f0a1c88229b8.tar.gz aspectj-9da980ed5c7be54a6703fe9c44b7f0a1c88229b8.zip |
Very very first simple helper bits of binary weaving decp
Diffstat (limited to 'weaver')
-rw-r--r-- | weaver/src/org/aspectj/weaver/Member.java | 14 | ||||
-rw-r--r-- | weaver/src/org/aspectj/weaver/ResolvedMember.java | 8 |
2 files changed, 22 insertions, 0 deletions
diff --git a/weaver/src/org/aspectj/weaver/Member.java b/weaver/src/org/aspectj/weaver/Member.java index eaf0c9217..f128ec32c 100644 --- a/weaver/src/org/aspectj/weaver/Member.java +++ b/weaver/src/org/aspectj/weaver/Member.java @@ -110,6 +110,20 @@ public class Member implements Comparable, AnnotatedElement { return buf.toString(); } + /** + * Returns "(<signaturesOfParamTypes>,...)" - unlike the other typesToSignature + * that also includes the return type, this one just deals with the parameter types. + */ + public static String typesToSignature(TypeX[] paramTypes) { + StringBuffer buf = new StringBuffer(); + buf.append("("); + for(int i=0;i<paramTypes.length;i++) { + buf.append(paramTypes[i].getSignature()); + } + buf.append(")"); + return buf.toString(); + } + /** returns an Object[] pair of TypeX, TypeX[] representing return type, * argument types parsed from the JVM bytecode signature of a method. Yes, * this should actually return a nice statically-typed pair object, but we diff --git a/weaver/src/org/aspectj/weaver/ResolvedMember.java b/weaver/src/org/aspectj/weaver/ResolvedMember.java index 90b8b59e9..21385a7f2 100644 --- a/weaver/src/org/aspectj/weaver/ResolvedMember.java +++ b/weaver/src/org/aspectj/weaver/ResolvedMember.java @@ -227,6 +227,14 @@ public class ResolvedMember extends Member implements IHasPosition, AnnotatedEle public boolean isPublic() { return Modifier.isPublic(modifiers); } + + public boolean isProtected() { + return Modifier.isProtected(modifiers); + } + + public boolean isDefault() { + return !(isPublic() || isProtected() || isPrivate()); + } public boolean isVisible(ResolvedTypeX fromType) { World world = fromType.getWorld(); |