]> source.dussan.org Git - aspectj.git/commitdiff
Very very first simple helper bits of binary weaving decp
authoraclement <aclement>
Tue, 4 Jan 2005 21:08:48 +0000 (21:08 +0000)
committeraclement <aclement>
Tue, 4 Jan 2005 21:08:48 +0000 (21:08 +0000)
weaver/src/org/aspectj/weaver/Member.java
weaver/src/org/aspectj/weaver/ResolvedMember.java

index eaf0c9217e70a3196310db3e35a1865e8adff1e4..f128ec32c6635b4539446d76227fe9f8666809be 100644 (file)
@@ -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
index 90b8b59e9e2375ea28dfaecb6fdbc1f2007829ad..21385a7f20e84ed046005ccccc785f24b39eac1b 100644 (file)
@@ -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();