Java Code Examples for com.fasterxml.jackson.databind.introspect.AnnotatedMember#getAnnotation()
The following examples show how to use
com.fasterxml.jackson.databind.introspect.AnnotatedMember#getAnnotation() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SwaggerJacksonAnnotationIntrospector.java From netty-rest with Apache License 2.0 | 6 votes |
@Override public Boolean hasRequiredMarker(AnnotatedMember m) { ApiParam apiParam = m.getAnnotation(ApiParam.class); if (apiParam != null) { return apiParam.required(); } ApiModelProperty ann = m.getAnnotation(ApiModelProperty.class); if (ann != null) { return ann.required(); } XmlElement elem = m.getAnnotation(XmlElement.class); if (elem != null) { if (elem.required()) { return true; } } return null; }
Example 2
Source File: SwaggerJacksonAnnotationIntrospector.java From netty-rest with Apache License 2.0 | 5 votes |
@Override public boolean hasIgnoreMarker(AnnotatedMember m) { ApiModelProperty ann = m.getAnnotation(ApiModelProperty.class); if (ann != null && ann.hidden()) { return true; } return false; }
Example 3
Source File: SwaggerJacksonAnnotationIntrospector.java From netty-rest with Apache License 2.0 | 5 votes |
@Override public String findImplicitPropertyName(AnnotatedMember member) { ApiParam annotation = member.getAnnotation(ApiParam.class); if (annotation != null && annotation.value() != "") { return annotation.value(); } else { return super.findImplicitPropertyName(member); } }
Example 4
Source File: AutoMatterAnnotationIntrospector.java From auto-matter with Apache License 2.0 | 5 votes |
@Override public String findImplicitPropertyName(final AnnotatedMember member) { final AutoMatter.Field field = member.getAnnotation(AutoMatter.Field.class); if (field == null) { return null; } if (member instanceof AnnotatedParameter) { return field.value(); } if (member instanceof AnnotatedMethod) { return member.getName(); } return null; }
Example 5
Source File: JacksonLombokAnnotationIntrospector.java From jackson-lombok with MIT License | 5 votes |
@Override public String findImplicitPropertyName(AnnotatedMember member) { JsonProperty property = member.getAnnotation(JsonProperty.class); if (property == null) { if (member instanceof AnnotatedMethod) { AnnotatedMethod method = (AnnotatedMethod) member; String fieldName = BeanUtil.okNameForGetter(method); return getJacksonPropertyName(member.getDeclaringClass(), fieldName); } } else if (!property.value().equals("")) { return property.value(); } return null; }
Example 6
Source File: SolrJacksonAnnotationInspector.java From lucene-solr with Apache License 2.0 | 4 votes |
@Override public Boolean hasRequiredMarker(AnnotatedMember m) { JsonProperty prop = m.getAnnotation(JsonProperty.class); if (prop == null) return Boolean.FALSE; return prop.required(); }
Example 7
Source File: ApiAnnotationIntrospector.java From endpoints-java with Apache License 2.0 | 4 votes |
@Override public boolean hasIgnoreMarker(AnnotatedMember member) { ApiResourceProperty apiProperty = member.getAnnotation(ApiResourceProperty.class); return apiProperty != null && apiProperty.ignored() == AnnotationBoolean.TRUE; }
Example 8
Source File: JsonldPropertyNamingStrategy.java From jackson-jsonld with MIT License | 4 votes |
private String jsonldName(AnnotatedMember member){ JsonldProperty jsonldProperty = member.getAnnotation(JsonldProperty.class); return jsonldProperty != null? jsonldProperty.value() : null; }