org.yaml.snakeyaml.introspector.Property.getAnnotation()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(1.1k)|赞(0)|评价(0)|浏览(185)

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

Property.getAnnotation介绍

[英]Returns property's annotation for the given type or null if it's not present.
[中]返回给定类型的属性注释,如果不存在,则返回null。

代码示例

代码示例来源:origin: redisson/redisson

@Override
public <A extends Annotation> A getAnnotation(Class<A> annotationType) {
  A annotation;
  if (read != null) {
    annotation = read.getAnnotation(annotationType);
  } else if (field != null) {
    annotation = field.getAnnotation(annotationType);
  } else {
    annotation = delegate.getAnnotation(annotationType);
  }
  return annotation;
}

代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded

@Override
public <A extends Annotation> A getAnnotation(Class<A> annotationType) {
  A annotation;
  if (read != null) {
    annotation = read.getAnnotation(annotationType);
  } else if (field != null) {
    annotation = field.getAnnotation(annotationType);
  } else {
    annotation = delegate.getAnnotation(annotationType);
  }
  return annotation;
}

相关文章