PropertyName pn = prop.getFullName(); if (!bbd.hasProperty(pn)) { BeanPropertyDefinition newDef = SimpleBeanPropertyDefinition.construct(
private SettableBeanProperty _findSoleTextProp(DeserializationConfig config, Iterator<SettableBeanProperty> propIt) { final AnnotationIntrospector ai = config.getAnnotationIntrospector(); SettableBeanProperty textProp = null; while (propIt.hasNext()) { SettableBeanProperty prop = propIt.next(); AnnotatedMember m = prop.getMember(); if (m != null) { // Ok, let's use a simple check: we should have renamed it earlier so: PropertyName n = prop.getFullName(); if (_cfgNameForTextValue.equals(n.getSimpleName())) { // should we verify we only got one? textProp = prop; continue; } // as-attribute are ok as well Boolean b = AnnotationUtil.findIsAttributeAnnotation(ai, m); if (b != null && b.booleanValue()) { continue; } } // Otherwise, it's something else; no go return null; } return textProp; } }
private SettableBeanProperty _findSoleTextProp(DeserializationConfig config, Iterator<SettableBeanProperty> propIt) { final AnnotationIntrospector ai = config.getAnnotationIntrospector(); SettableBeanProperty textProp = null; while (propIt.hasNext()) { SettableBeanProperty prop = propIt.next(); AnnotatedMember m = prop.getMember(); if (m != null) { // Ok, let's use a simple check: we should have renamed it earlier so: PropertyName n = prop.getFullName(); if (_cfgNameForTextValue.equals(n.getSimpleName())) { // should we verify we only got one? textProp = prop; continue; } // as-attribute are ok as well Boolean b = AnnotationUtil.findIsAttributeAnnotation(ai, m); if (b != null && b.booleanValue()) { continue; } } // Otherwise, it's something else; no go return null; } return textProp; } }
public ManagedReferenceProperty(SettableBeanProperty forward, String refName, SettableBeanProperty backward, Annotations contextAnnotations, boolean isContainer) { super(forward.getFullName(), forward.getType(), forward.getWrapperName(), forward.getValueTypeDeserializer(), contextAnnotations, forward.getMetadata()); _referenceName = refName; _managedProperty = forward; _backProperty = backward; _isContainer = isContainer; }
public ManagedReferenceProperty(SettableBeanProperty forward, String refName, SettableBeanProperty backward, Annotations contextAnnotations, boolean isContainer) { super(forward.getFullName(), forward.getType(), forward.getWrapperName(), forward.getValueTypeDeserializer(), contextAnnotations, forward.getMetadata()); _referenceName = refName; _managedProperty = forward; _backProperty = backward; _isContainer = isContainer; }
public ManagedReferenceProperty(SettableBeanProperty forward, String refName, SettableBeanProperty backward, Annotations contextAnnotations, boolean isContainer) { super(forward.getFullName(), forward.getType(), forward.getWrapperName(), forward.getValueTypeDeserializer(), contextAnnotations, forward.getMetadata()); _referenceName = refName; _managedProperty = forward; _backProperty = backward; _isContainer = isContainer; }
public static class MyBeanDeserializerModifier extends BeanDeserializerModifier { @Override public BeanDeserializerBuilder updateBuilder(DeserializationConfig config, BeanDescription beanDesc, BeanDeserializerBuilder builder) { if (beanDesc.getBeanClass() != Contact.class) { return builder; } List<PropertyName> properties = new ArrayList<>(); Iterator<SettableBeanProperty> beanPropertyIterator = builder.getProperties(); Class<?> activeView = config.getActiveView(); while (beanPropertyIterator.hasNext()) { SettableBeanProperty settableBeanProperty = beanPropertyIterator.next(); if (!settableBeanProperty.visibleInView(activeView)) { properties.add(settableBeanProperty.getFullName()); } } for(PropertyName p : properties){ builder.removeProperty(p); } return builder; } }
PropertyName pn = prop.getFullName(); if (!bbd.hasProperty(pn)) { BeanPropertyDefinition newDef = SimpleBeanPropertyDefinition.construct(
PropertyName pn = prop.getFullName(); if (!bbd.hasProperty(pn)) { BeanPropertyDefinition newDef = SimpleBeanPropertyDefinition.construct(