/** * Accessor for iterating over properties this deserializer uses; with * the exception that properties passed via Creator methods * (specifically, "property-based constructor") are not included, * but can be accessed separate by calling * {@link #creatorProperties} */ public Iterator<SettableBeanProperty> properties() { if (_beanProperties == null) { throw new IllegalStateException("Can only call after BeanDeserializer has been resolved"); } return _beanProperties.iterator(); }
@Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("Properties=["); int count = 0; Iterator<SettableBeanProperty> it = iterator(); while (it.hasNext()) { SettableBeanProperty prop = it.next(); if (count++ > 0) { sb.append(", "); } sb.append(prop.getName()); sb.append('('); sb.append(prop.getType()); sb.append(')'); } sb.append(']'); if (!_aliasDefs.isEmpty()) { sb.append("(aliases: "); sb.append(_aliasDefs); sb.append(")"); } return sb.toString(); }
/** * Accessor for iterating over properties this deserializer uses; with * the exception that properties passed via Creator methods * (specifically, "property-based constructor") are not included, * but can be accessed separate by calling * {@link #creatorProperties} */ public Iterator<SettableBeanProperty> properties() { if (_beanProperties == null) { throw new IllegalStateException("Can only call after BeanDeserializer has been resolved"); } return _beanProperties.iterator(); }
/** * Accessor for iterating over properties this deserializer uses; with * the exception that properties passed via Creator methods * (specifically, "property-based constructor") are not included, * but can be accessed separate by calling * {@link #creatorProperties} */ public Iterator<SettableBeanProperty> properties() { if (_beanProperties == null) { throw new IllegalStateException("Can only call after BeanDeserializer has been resolved"); } return _beanProperties.iterator(); }
/** * Accessor for iterating over properties this deserializer uses; with * the exception that properties passed via Creator methods * (specifically, "property-based constructor") are not included, * but can be accessed separate by calling * {@link #creatorProperties} */ public Iterator<SettableBeanProperty> properties() { if (_beanProperties == null) { throw new IllegalStateException("Can only call after BeanDeserializer has been resolved"); } return _beanProperties.iterator(); }
/** * Accessor for iterating over properties this deserializer uses; with * the exception that properties passed via Creator methods * (specifically, "property-based constructor") are not included, * but can be accessed separate by calling * {@link #creatorProperties} */ public Iterator<SettableBeanProperty> properties() { if (_beanProperties == null) { throw new IllegalStateException("Can only call after BeanDeserializer has been resolved"); } return _beanProperties.iterator(); }
/** * Accessor for iterating over properties this deserializer uses; with * the exception that properties passed via Creator methods * (specifically, "property-based constructor") are not included, * but can be accessed separate by calling * {@link #creatorProperties} */ public Iterator<SettableBeanProperty> properties() { if (_beanProperties == null) { throw new IllegalStateException("Can only call after BeanDeserializer has been resolved"); } return _beanProperties.iterator(); }
/** * Accessor for iterating over properties this deserializer uses; with * the exception that properties passed via Creator methods * (specifically, "property-based constructor") are not included, * but can be accessed separate by calling * {@link #creatorProperties} */ public Iterator<SettableBeanProperty> properties() { if (_beanProperties == null) { throw new IllegalStateException("Can only call after BeanDeserializer has been resolved"); } return _beanProperties.iterator(); }
@Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("Properties=["); int count = 0; Iterator<SettableBeanProperty> it = iterator(); while (it.hasNext()) { SettableBeanProperty prop = it.next(); if (count++ > 0) { sb.append(", "); } sb.append(prop.getName()); sb.append('('); sb.append(prop.getType()); sb.append(')'); } sb.append(']'); return sb.toString(); }
@Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("Properties=["); int count = 0; Iterator<SettableBeanProperty> it = iterator(); while (it.hasNext()) { SettableBeanProperty prop = it.next(); if (count++ > 0) { sb.append(", "); } sb.append(prop.getName()); sb.append('('); sb.append(prop.getType()); sb.append(')'); } sb.append(']'); if (!_aliasDefs.isEmpty()) { sb.append("(aliases: "); sb.append(_aliasDefs); sb.append(")"); } return sb.toString(); }
/** * Factory method for constructing a map where all entries use given * prefix */ public BeanPropertyMap renameAll(NameTransformer transformer) { if (transformer == null || (transformer == NameTransformer.NOP)) { return this; } Iterator<SettableBeanProperty> it = iterator(); ArrayList<SettableBeanProperty> newProps = new ArrayList<SettableBeanProperty>(); while (it.hasNext()) { SettableBeanProperty prop = it.next(); String newName = transformer.transform(prop.getName()); prop = prop.withSimpleName(newName); JsonDeserializer<?> deser = prop.getValueDeserializer(); if (deser != null) { @SuppressWarnings("unchecked") JsonDeserializer<Object> newDeser = (JsonDeserializer<Object>) deser.unwrappingDeserializer(transformer); if (newDeser != deser) { prop = prop.withValueDeserializer(newDeser); } } newProps.add(prop); } // should we try to re-index? Ordering probably changed but called probably doesn't want changes... return new BeanPropertyMap(newProps, _caseInsensitive); }
/** * Factory method for constructing a map where all entries use given * prefix */ public BeanPropertyMap renameAll(NameTransformer transformer) { if (transformer == null || (transformer == NameTransformer.NOP)) { return this; } Iterator<SettableBeanProperty> it = iterator(); ArrayList<SettableBeanProperty> newProps = new ArrayList<SettableBeanProperty>(); while (it.hasNext()) { SettableBeanProperty prop = it.next(); String newName = transformer.transform(prop.getName()); prop = prop.withSimpleName(newName); JsonDeserializer<?> deser = prop.getValueDeserializer(); if (deser != null) { @SuppressWarnings("unchecked") JsonDeserializer<Object> newDeser = (JsonDeserializer<Object>) deser.unwrappingDeserializer(transformer); if (newDeser != deser) { prop = prop.withValueDeserializer(newDeser); } } newProps.add(prop); } // should we try to re-index? Ordering probably changed but called probably doesn't want changes... return new BeanPropertyMap(newProps, _caseInsensitive); }
/** * Factory method for constructing a map where all entries use given * prefix */ public BeanPropertyMap renameAll(NameTransformer transformer) { if (transformer == null || (transformer == NameTransformer.NOP)) { return this; } Iterator<SettableBeanProperty> it = iterator(); ArrayList<SettableBeanProperty> newProps = new ArrayList<SettableBeanProperty>(); while (it.hasNext()) { SettableBeanProperty prop = it.next(); String newName = transformer.transform(prop.getName()); prop = prop.withName(newName); JsonDeserializer<?> deser = prop.getValueDeserializer(); if (deser != null) { @SuppressWarnings("unchecked") JsonDeserializer<Object> newDeser = (JsonDeserializer<Object>) deser.unwrappingDeserializer(transformer); if (newDeser != deser) { prop = prop.withValueDeserializer(newDeser); } } newProps.add(prop); } // should we try to re-index? Ordering probably changed but called probably doesn't want changes... return new BeanPropertyMap(newProps); }
/** * Factory method for constructing a map where all entries use given * prefix */ public BeanPropertyMap renameAll(NameTransformer transformer) { if (transformer == null || (transformer == NameTransformer.NOP)) { return this; } Iterator<SettableBeanProperty> it = iterator(); ArrayList<SettableBeanProperty> newProps = new ArrayList<SettableBeanProperty>(); while (it.hasNext()) { SettableBeanProperty prop = it.next(); String newName = transformer.transform(prop.getName()); prop = prop.withName(newName); JsonDeserializer<?> deser = prop.getValueDeserializer(); if (deser != null) { @SuppressWarnings("unchecked") JsonDeserializer<Object> newDeser = (JsonDeserializer<Object>) deser.unwrappingDeserializer(transformer); if (newDeser != deser) { prop = prop.withValueDeserializer(newDeser); } } newProps.add(prop); } // should we try to re-index? Ordering probably changed but called probably doesn't want changes... return new BeanPropertyMap(newProps); }