/**
* Get the kind from the class if the class has an @Entity annotation, otherwise return null.
*/
private static String getKindHere(Class<?> clazz) {
// @Entity is inherited so we have to be explicit about the declared annotations
Entity ourAnn = TypeUtils.getDeclaredAnnotation(clazz, Entity.class);
if (ourAnn != null)
if (ourAnn.name() != null && ourAnn.name().length() != 0)
return ourAnn.name();
else
return clazz.getSimpleName();
return null;
}