/** * Recursively climbs the class hierarchy looking for the first @Entity annotation. * @return the kind of the first @Entity found, or null if nothing can be found */ private static String getRequiredEntityKind(Class<?> clazz) { if (clazz == Object.class) return null; String kind = getKindHere(clazz); if (kind != null) return kind; else return getRequiredEntityKind(clazz.getSuperclass()); }
kind = getRequiredEntityKind(clazz.getSuperclass()); if (kind != null) return kind;