org.json.JSONObject.getAnnotationDepth()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(1.6k)|赞(0)|评价(0)|浏览(154)

本文整理了Java中org.json.JSONObject.getAnnotationDepth()方法的一些代码示例,展示了JSONObject.getAnnotationDepth()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JSONObject.getAnnotationDepth()方法的具体详情如下:
包路径:org.json.JSONObject
类名称:JSONObject
方法名:getAnnotationDepth

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) {

相关文章

JSONObject类方法