Index: src/org/python/core/PyJavaType.java =================================================================== --- src/org/python/core/PyJavaType.java (revision 5923) +++ src/org/python/core/PyJavaType.java (working copy) @@ -6,6 +6,7 @@ import java.lang.reflect.Method; import java.lang.reflect.Modifier; import java.util.ArrayList; +import java.util.Arrays; import java.util.Collection; import java.util.Enumeration; import java.util.EventListener; @@ -116,21 +117,36 @@ methods = underlying_class.getMethods(); } else { methods = underlying_class.getDeclaredMethods(); + // Need to include inherited methods to get full set of class properties + Class sc = underlying_class.getSuperclass(); + int curIdx = methods.length; + while (sc != null) { + Method[] superMethods = sc.getDeclaredMethods(); + if (superMethods != null && superMethods.length > 0) { + methods = Arrays.copyOf(methods, methods.length + superMethods.length); + System.arraycopy(superMethods, 0, methods, curIdx, superMethods.length); + curIdx += superMethods.length; + } + sc = sc.getSuperclass(); + } + for (Method method : methods) { method.setAccessible(true); } } for (Method meth : methods) { - if (!declaredOnMember(baseClass, meth) || ignore(meth)) { + if (ignore(meth)) { continue; } String methname = meth.getName(); String nmethname = normalize(methname); - PyReflectedFunction reflfunc = (PyReflectedFunction)dict.__finditem__(nmethname); - if (reflfunc == null) { - dict.__setitem__(nmethname, new PyReflectedFunction(meth)); - } else { - reflfunc.addMethod(meth); + if (declaredOnMember(baseClass, meth)) { + PyReflectedFunction reflfunc = (PyReflectedFunction)dict.__finditem__(nmethname); + if (reflfunc == null) { + dict.__setitem__(nmethname, new PyReflectedFunction(meth)); + } else { + reflfunc.addMethod(meth); + } } // Now check if this is a bean method, for which it must be an instance method