* ignore getters declared in java.* super classes

This commit is contained in:
Reinhard Pointner 2013-02-07 07:58:04 +00:00
parent cc0e468659
commit 9de6d318c0
1 changed files with 1 additions and 1 deletions

View File

@ -27,7 +27,7 @@ public class PropertyBindings extends AbstractMap<String, Object> {
// get method bindings // get method bindings
for (Method method : object.getClass().getMethods()) { for (Method method : object.getClass().getMethods()) {
if (method.getReturnType() != void.class && method.getParameterTypes().length == 0) { if (method.getReturnType() != void.class && method.getParameterTypes().length == 0 && !method.getDeclaringClass().getName().startsWith("java")) {
// normal properties // normal properties
if (method.getName().length() > 3 && method.getName().substring(0, 3).equalsIgnoreCase("get")) { if (method.getName().length() > 3 && method.getName().substring(0, 3).equalsIgnoreCase("get")) {
properties.put(method.getName().substring(3), method); properties.put(method.getName().substring(3), method);