List of usage examples for com.fasterxml.jackson.databind.introspect BeanPropertyDefinition getField
public abstract AnnotatedField getField();
From source file:org.midonet.cluster.rest_api.serialization.MidonetObjectMapper.java
static JsonError getError(DeserializationConfig config, JavaType valueType, String fieldName) { try {/* ww w .ja v a 2 s . c o m*/ BasicBeanDescription beanDesc = config.introspect(valueType); for (BeanPropertyDefinition property : beanDesc.findProperties()) { if (property.getName().equals(fieldName) && null != property.getField() && null != property.getField().getAnnotated()) { return property.getField().getAnnotated().getAnnotation(JsonError.class); } } return null; } catch (Exception e) { return null; } }