Commits

Darjus Loktevic committed a310960

Move the method+signature checking into visitMethods.

Comments (0)

Files changed (1)

src/org/python/compiler/ProxyMaker.java

         String[] exceptionTypes = mapExceptions(exceptions);
 
         names.add(name);
-        
-        // make sure we have only one name + signature pair available per method
-        if (!namesAndSigs.add(name + sig)) {
-        	return;
-        }
 
         Code code = null;
         if (methodAnnotations != null && parameterAnnotations != null) {
      */
     protected void visitMethods(Class<?> klass) throws Exception {
         for (Method method : klass.getDeclaredMethods()) {
-                int access = method.getModifiers();
-                if (Modifier.isStatic(access) || Modifier.isPrivate(access)) {
-                    continue;
-                }
+        	
+            
+            // make sure we have only one name + signature pair available per method
+            if (!namesAndSigs.add(methodString(method))) {
+            	continue;
+            }
 
-                if (Modifier.isNative(access)) {
-                    access = access & ~Modifier.NATIVE;
-                }
+            int access = method.getModifiers();
+            if (Modifier.isStatic(access) || Modifier.isPrivate(access)) {
+            	continue;
+            }
 
-                if (Modifier.isProtected(access)) {
-                    access = (access & ~Modifier.PROTECTED) | Modifier.PUBLIC;
-                    if (Modifier.isFinal(access)) {
-                        addSuperMethod(method, access);
-                        continue;
-                    }
-                } else if (Modifier.isFinal(access)) {
-                    continue;
-                } else if (!Modifier.isPublic(access)) {
-                    continue; // package protected by process of elimination; we can't override
-                }
-                addMethod(method, access);
+            if (Modifier.isNative(access)) {
+            	access = access & ~Modifier.NATIVE;
+            }
+
+            if (Modifier.isProtected(access)) {
+            	access = (access & ~Modifier.PROTECTED) | Modifier.PUBLIC;
+            	if (Modifier.isFinal(access)) {
+            		addSuperMethod(method, access);
+            		continue;
+            	}
+            } else if (Modifier.isFinal(access)) {
+            	continue;
+            } else if (!Modifier.isPublic(access)) {
+            	continue; // package protected by process of elimination; we can't override
+            }
+            addMethod(method, access);
         }
 
         Class<?> superClass = klass.getSuperclass();
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.