本文整理了Java中org.json.JSONObject.getAnnotationDepth()
方法的一些代码示例,展示了JSONObject.getAnnotationDepth()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JSONObject.getAnnotationDepth()
方法的具体详情如下:
包路径:org.json.JSONObject
类名称:JSONObject
方法名:getAnnotationDepth
[英]Searches the class hierarchy to see if the method or it's super implementations and interfaces has the annotation. Returns the depth of the annotation in the hierarchy.
[中]搜索类层次结构以查看方法或其超级实现和接口是否具有注释。返回层次结构中注释的深度。
代码示例来源:origin: b3log/latke
try {
Method im = i.getMethod(m.getName(), m.getParameterTypes());
int d = getAnnotationDepth(im, annotationClass);
if (d > 0) {
int d = getAnnotationDepth(
c.getSuperclass().getMethod(m.getName(), m.getParameterTypes()),
annotationClass);
代码示例来源:origin: b3log/latke
private String getKeyNameFromMethod(Method method) {
final int ignoreDepth = getAnnotationDepth(method, JSONPropertyIgnore.class);
if (ignoreDepth > 0) {
final int forcedNameDepth = getAnnotationDepth(method, JSONPropertyName.class);
if (forcedNameDepth < 0 || ignoreDepth <= forcedNameDepth) {
代码示例来源:origin: org.b3log/latke
try {
Method im = i.getMethod(m.getName(), m.getParameterTypes());
int d = getAnnotationDepth(im, annotationClass);
if (d > 0) {
int d = getAnnotationDepth(
c.getSuperclass().getMethod(m.getName(), m.getParameterTypes()),
annotationClass);
代码示例来源:origin: org.b3log/latke
private String getKeyNameFromMethod(Method method) {
final int ignoreDepth = getAnnotationDepth(method, JSONPropertyIgnore.class);
if (ignoreDepth > 0) {
final int forcedNameDepth = getAnnotationDepth(method, JSONPropertyName.class);
if (forcedNameDepth < 0 || ignoreDepth <= forcedNameDepth) {
内容来源于网络,如有侵权,请联系作者删除!