本文整理了Java中com.googlecode.objectify.Key.getKindHere()
方法的一些代码示例,展示了Key.getKindHere()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Key.getKindHere()
方法的具体详情如下:
包路径:com.googlecode.objectify.Key
类名称:Key
方法名:getKindHere
[英]Get the kind from the class if the class has an @Entity annotation, otherwise return null.
[中]
代码示例来源:origin: objectify/objectify
/**
* <p>Recursively looks for the @Entity annotation.</p>
*
* @return null if kind cannot be found
*/
private static String getKindRecursive(final Class<?> clazz) {
if (clazz == Object.class)
return null;
final String kind = getKindHere(clazz);
if (kind != null)
return kind;
else
return getKindRecursive(clazz.getSuperclass());
}
代码示例来源:origin: com.googlecode.cedar-common/objectify
/**
* 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());
}
代码示例来源:origin: com.googlecode.cedar-common/objectify
String kind = getKindHere(clazz);
if (kind != null)
return kind;
内容来源于网络,如有侵权,请联系作者删除!