@Override public int compareTo(POJOPropertyBuilder other) { // first, if one has ctor params, that should come first: if (_ctorParameters != null) { if (other._ctorParameters == null) { return -1; } } else if (other._ctorParameters != null) { return 1; } /* otherwise sort by external name (including sorting of * ctor parameters) */ return getName().compareTo(other.getName()); }
String name = prop.getName(); POJOPropertyBuilder old = _properties.get(name); if (old == null) {
@Override public AnnotatedField getField() { if (_fields == null) { return null; } // If multiple, verify that they do not conflict... AnnotatedField field = _fields.value; Node<AnnotatedField> next = _fields.next; for (; next != null; next = next.next) { AnnotatedField nextField = next.value; Class<?> fieldClass = field.getDeclaringClass(); Class<?> nextClass = nextField.getDeclaringClass(); if (fieldClass != nextClass) { if (fieldClass.isAssignableFrom(nextClass)) { // next is more specific field = nextField; continue; } if (nextClass.isAssignableFrom(fieldClass)) { // getter more specific continue; } } throw new IllegalArgumentException("Multiple fields representing property \""+getName()+"\": " +field.getFullName()+" vs "+nextField.getFullName()); } return field; }
throw new IllegalArgumentException("Conflicting getter definitions for property \""+getName()+"\": " +getter.getFullName()+" vs "+nextGetter.getFullName());
throw new IllegalArgumentException("Conflicting setter definitions for property \""+getName()+"\": " +setter.getFullName()+" vs "+nextSetter.getFullName());
private void _addIgnored(POJOPropertyBuilder prop) { // not used in any way for serialization side: if (_forSerialization) { return; } /* and with deserialization, two aspects: whether it's ok to see * property ('ignore for failure reporting') and whether we forcifully * ignore it even if there was "any setter" available. */ // but do not add unless ignoral was for field, setter or ctor param String name = prop.getName(); _ignoredPropertyNames = addToSet(_ignoredPropertyNames, name); if (prop.anyDeserializeIgnorals()) { _ignoredPropertyNamesForDeser = addToSet(_ignoredPropertyNamesForDeser, name); } }
@Override public int compareTo(POJOPropertyBuilder other) { // first, if one has ctor params, that should come first: if (_ctorParameters != null) { if (other._ctorParameters == null) { return -1; } } else if (other._ctorParameters != null) { return 1; } /* otherwise sort by external name (including sorting of * ctor parameters) */ return getName().compareTo(other.getName()); }
String name = prop.getName(); POJOPropertyBuilder old = _properties.get(name); if (old == null) {
@Override public AnnotatedField getField() { if (_fields == null) { return null; } // If multiple, verify that they do not conflict... AnnotatedField field = _fields.value; Node<AnnotatedField> next = _fields.next; for (; next != null; next = next.next) { AnnotatedField nextField = next.value; Class<?> fieldClass = field.getDeclaringClass(); Class<?> nextClass = nextField.getDeclaringClass(); if (fieldClass != nextClass) { if (fieldClass.isAssignableFrom(nextClass)) { // next is more specific field = nextField; continue; } if (nextClass.isAssignableFrom(fieldClass)) { // getter more specific continue; } } throw new IllegalArgumentException("Multiple fields representing property \""+getName()+"\": " +field.getFullName()+" vs "+nextField.getFullName()); } return field; }
throw new IllegalArgumentException("Conflicting getter definitions for property \""+getName()+"\": " +getter.getFullName()+" vs "+nextGetter.getFullName());
throw new IllegalArgumentException("Conflicting setter definitions for property \""+getName()+"\": " +setter.getFullName()+" vs "+nextSetter.getFullName());
private void _addIgnored(POJOPropertyBuilder prop) { // not used in any way for serialization side: if (_forSerialization) { return; } /* and with deserialization, two aspects: whether it's ok to see * property ('ignore for failure reporting') and whether we forcifully * ignore it even if there was "any setter" available. */ // but do not add unless ignoral was for field, setter or ctor param String name = prop.getName(); _ignoredPropertyNames = addToSet(_ignoredPropertyNames, name); if (prop.anyDeserializeIgnorals()) { _ignoredPropertyNamesForDeser = addToSet(_ignoredPropertyNamesForDeser, name); } }
@Override public int compareTo(POJOPropertyBuilder other) { // first, if one has ctor params, that should come first: if (_ctorParameters != null) { if (other._ctorParameters == null) { return -1; } } else if (other._ctorParameters != null) { return 1; } /* otherwise sort by external name (including sorting of * ctor parameters) */ return getName().compareTo(other.getName()); }
@Override public int compareTo(POJOPropertyBuilder other) { // first, if one has ctor params, that should come first: if (_ctorParameters != null) { if (other._ctorParameters == null) { return -1; } } else if (other._ctorParameters != null) { return 1; } /* otherwise sort by external name (including sorting of * ctor parameters) */ return getName().compareTo(other.getName()); }
@Override public AnnotatedField getField() { if (_fields == null) { return null; } // If multiple, verify that they do not conflict... AnnotatedField field = _fields.value; Node<AnnotatedField> next = _fields.next; for (; next != null; next = next.next) { AnnotatedField nextField = next.value; Class<?> fieldClass = field.getDeclaringClass(); Class<?> nextClass = nextField.getDeclaringClass(); if (fieldClass != nextClass) { if (fieldClass.isAssignableFrom(nextClass)) { // next is more specific field = nextField; continue; } if (nextClass.isAssignableFrom(fieldClass)) { // getter more specific continue; } } throw new IllegalArgumentException("Multiple fields representing property \""+getName()+"\": " +field.getFullName()+" vs "+nextField.getFullName()); } return field; }
private void _addIgnored(POJOPropertyBuilder prop) { // not used in any way for serialization side: if (_forSerialization) { return; } /* and with deserialization, two aspects: whether it's ok to see * property ('ignore for failure reporting') and whether we forcifully * ignore it even if there was "any setter" available. */ // but do not add unless ignoral was for field, setter or ctor param String name = prop.getName(); _ignoredPropertyNames = addToSet(_ignoredPropertyNames, name); if (prop.anyDeserializeIgnorals()) { _ignoredPropertyNamesForDeser = addToSet(_ignoredPropertyNamesForDeser, name); } }