From 2ff3bac12deeb141e197755ec3f06a0791d2b117 Mon Sep 17 00:00:00 2001 From: Ray Greenwell Date: Fri, 1 Oct 2010 01:29:46 +0000 Subject: [PATCH] Look for any worthy method, even in superclasses. --- src/main/java/com/samskivert/depot/impl/FieldMarshaller.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/samskivert/depot/impl/FieldMarshaller.java b/src/main/java/com/samskivert/depot/impl/FieldMarshaller.java index a7533c7..9f80e22 100644 --- a/src/main/java/com/samskivert/depot/impl/FieldMarshaller.java +++ b/src/main/java/com/samskivert/depot/impl/FieldMarshaller.java @@ -392,8 +392,9 @@ public abstract class FieldMarshaller protected static Class getTransformerType (Transformer xformer, String which) { Class ttype = null; - for (Method method : xformer.getClass().getDeclaredMethods()) { - if (method.getName().equals(which + "Persistent")) { + String methodName = which + "Persistent"; + for (Method method : xformer.getClass().getMethods()) { + if (method.getName().equals(methodName)) { if (ttype == null || ttype.isAssignableFrom(method.getReturnType())) { ttype = method.getReturnType(); }