com.fasterxml.jackson.databind.introspect.AnnotatedParameter.getAnnotation()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(3.8k)|赞(0)|评价(0)|浏览(72)

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

AnnotatedParameter.getAnnotation介绍

[英]Accessor for annotations; all annotations associated with parameters are properly passed and accessible.
[中]注释存取器;与参数关联的所有注释都已正确传递并可访问。

代码示例

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

@Override
public <A extends Annotation> A getAnnotation(Class<A> acls) {
  if (_annotated == null) {
    return null;
  }
  return _annotated.getAnnotation(acls);
}

代码示例来源:origin: com.fasterxml.jackson.core/com.springsource.com.fasterxml.jackson.core.jackson-databind

@Override
public <A extends Annotation> A getAnnotation(Class<A> acls) {
  if (_annotated == null) {
    return null;
  }
  return _annotated.getAnnotation(acls);
}

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-analytics

@Override
public <A extends Annotation> A getAnnotation(Class<A> acls) {
  if (_annotated == null) {
    return null;
  }
  return _annotated.getAnnotation(acls);
}

代码示例来源:origin: Nextdoor/bender

@Override
public <A extends Annotation> A getAnnotation(Class<A> acls) {
  if (_annotated == null) {
    return null;
  }
  return _annotated.getAnnotation(acls);
}

代码示例来源:origin: com.eclipsesource.jaxrs/jersey-all

@Override
public <A extends Annotation> A getAnnotation(Class<A> acls) {
  if (_annotated == null) {
    return null;
  }
  return _annotated.getAnnotation(acls);
}

代码示例来源:origin: com.jwebmp.jackson.core/jackson-databind

@Override
public <A extends Annotation> A getAnnotation(Class<A> acls) {
  if (_annotated == null) {
    return null;
  }
  return _annotated.getAnnotation(acls);
}

代码示例来源:origin: hstaudacher/osgi-jax-rs-connector

@Override
public <A extends Annotation> A getAnnotation(Class<A> acls) {
  if (_annotated == null) {
    return null;
  }
  return _annotated.getAnnotation(acls);
}

代码示例来源:origin: com.fasterxml.jackson.core/com.springsource.com.fasterxml.jackson.core.jackson-databind

@Override
public String findDeserializationName(AnnotatedParameter param)
{
  if (param != null) {
    JsonProperty pann = param.getAnnotation(JsonProperty.class);
    if (pann != null) {
      return pann.value();
    }
    /* And can not use JsonDeserialize as we can not use
     * name auto-detection (names of local variables including
     * parameters are not necessarily preserved in bytecode)
     */
  }
  return null;
}

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-analytics

@Override
public String findDeserializationName(AnnotatedParameter param)
{
  if (param != null) {
    JsonProperty pann = param.getAnnotation(JsonProperty.class);
    if (pann != null) {
      return pann.value();
    }
    /* And can not use JsonDeserialize as we can not use
     * name auto-detection (names of local variables including
     * parameters are not necessarily preserved in bytecode)
     */
  }
  return null;
}

代码示例来源:origin: danielnorberg/auto-matter

@Override
 public boolean hasCreatorAnnotation(final Annotated a) {
  if (!(a instanceof AnnotatedConstructor)) {
   return false;
  }
  final AnnotatedConstructor ctor = (AnnotatedConstructor) a;
  if (ctor.getParameterCount() == 0) {
   return true;
  }
  final AutoMatter.Field field = ctor.getParameter(0).getAnnotation(AutoMatter.Field.class);
  return field != null;
 }
}

代码示例来源:origin: io.norberg/auto-matter-jackson

@Override
 public boolean hasCreatorAnnotation(final Annotated a) {
  if (!(a instanceof AnnotatedConstructor)) {
   return false;
  }
  final AnnotatedConstructor ctor = (AnnotatedConstructor) a;
  if (ctor.getParameterCount() == 0) {
   return true;
  }
  final AutoMatter.Field field = ctor.getParameter(0).getAnnotation(AutoMatter.Field.class);
  return field != null;
 }
}

代码示例来源:origin: marklogic/java-client-api

if ( property.hasConstructorParameter() ) {
 AnnotatedParameter parameter = property.getConstructorParameter();
 T constructorAnnotation = parameter.getAnnotation(annotation);
 if ( constructorAnnotation != null ) {
  AnnotationFound<T> found = new AnnotationFound<>();

相关文章