public Value withContentInclusion(Include incl) { return (incl == _contentInclusion) ? this : new Value(_valueInclusion, incl); }
/** * Factory method to use for constructing an instance for components */ public static Value construct(Include valueIncl, Include contentIncl) { if (((valueIncl == Include.USE_DEFAULTS) || (valueIncl == null)) && ((contentIncl == Include.USE_DEFAULTS) || (contentIncl == null))) { return EMPTY; } return new Value(valueIncl, contentIncl); }
/** * Mutant factory method that merges values of this value with given override * values, so that any explicitly defined inclusion in overrides has precedence over * settings of this value instance. If no overrides exist will return <code>this</code> * instance; otherwise new {@link Value} with changed inclusion values. */ public Value withOverrides(Value overrides) { if ((overrides == null) || (overrides == EMPTY)) { return this; } Include vi = overrides._valueInclusion; Include ci = overrides._contentInclusion; Class<?> vf = overrides._valueFilter; Class<?> cf = overrides._contentFilter; boolean viDiff = (vi != _valueInclusion) && (vi != Include.USE_DEFAULTS); boolean ciDiff = (ci != _contentInclusion) && (ci != Include.USE_DEFAULTS); boolean filterDiff = (vf != _valueFilter) || (cf != _valueFilter); if (viDiff) { if (ciDiff) { return new Value(vi, ci, vf, cf); } return new Value(vi, _contentInclusion, vf, cf); } else if (ciDiff) { return new Value(_valueInclusion, ci, vf, cf); } else if (filterDiff) { return new Value(_valueInclusion, _contentInclusion, vf, cf); } return this; }
/** * Factory method to use for constructing an instance for components */ public static Value construct(Include valueIncl, Include contentIncl, Class<?> valueFilter, Class<?> contentFilter) { if (valueFilter == Void.class) { valueFilter = null; } if (contentFilter == Void.class) { contentFilter = null; } if (((valueIncl == Include.USE_DEFAULTS) || (valueIncl == null)) && ((contentIncl == Include.USE_DEFAULTS) || (contentIncl == null)) && (valueFilter == null) && (contentFilter == null) ) { return EMPTY; } return new Value(valueIncl, contentIncl, valueFilter, contentFilter); }
/** * Factory method to use for constructing an instance from instance of * {@link JsonInclude} */ public static Value from(JsonInclude src) { if (src == null) { return EMPTY; } Include vi = src.value(); Include ci = src.content(); if ((vi == Include.USE_DEFAULTS) && (ci == Include.USE_DEFAULTS)) { return EMPTY; } Class<?> vf = src.valueFilter(); if (vf == Void.class) { vf = null; } Class<?> cf = src.contentFilter(); if (cf == Void.class) { cf = null; } return new Value(vi, ci, vf, cf); }
public Value withContentInclusion(Include incl) { return (incl == _contentInclusion) ? this : new Value(_valueInclusion, incl, _valueFilter, _contentFilter); }
public Value withValueInclusion(Include incl) { return (incl == _valueInclusion) ? this : new Value(incl, _contentInclusion, _valueFilter, _contentFilter); }
/** * Factory method to use for constructing an instance for components */ public static Value construct(Include valueIncl, Include contentIncl) { if (((valueIncl == Include.USE_DEFAULTS) || (valueIncl == null)) && ((contentIncl == Include.USE_DEFAULTS) || (contentIncl == null))) { return EMPTY; } return new Value(valueIncl, contentIncl, null, null); }
/** * Mutant factory method that merges values of this value with given override * values, so that any explicitly defined inclusion in overrides has precedence over * settings of this value instance. If no overrides exist will return <code>this</code> * instance; otherwise new {@link Value} with changed inclusion values. */ public Value withOverrides(Value overrides) { if ((overrides == null) || (overrides == EMPTY)) { return this; } Include vi = overrides._valueInclusion; Include ci = overrides._contentInclusion; Class<?> vf = overrides._valueFilter; Class<?> cf = overrides._contentFilter; boolean viDiff = (vi != _valueInclusion) && (vi != Include.USE_DEFAULTS); boolean ciDiff = (ci != _contentInclusion) && (ci != Include.USE_DEFAULTS); boolean filterDiff = (vf != _valueFilter) || (cf != _valueFilter); if (viDiff) { if (ciDiff) { return new Value(vi, ci, vf, cf); } return new Value(vi, _contentInclusion, vf, cf); } else if (ciDiff) { return new Value(_valueInclusion, ci, vf, cf); } else if (filterDiff) { return new Value(_valueInclusion, _contentInclusion, vf, cf); } return this; }
/** * Factory method to use for constructing an instance for components * * @since 2.9 */ public static Value construct(Include valueIncl, Include contentIncl, Class<?> valueFilter, Class<?> contentFilter) { if (valueFilter == Void.class) { valueFilter = null; } if (contentFilter == Void.class) { contentFilter = null; } if (((valueIncl == Include.USE_DEFAULTS) || (valueIncl == null)) && ((contentIncl == Include.USE_DEFAULTS) || (contentIncl == null)) && (valueFilter == null) && (contentFilter == null) ) { return EMPTY; } return new Value(valueIncl, contentIncl, valueFilter, contentFilter); }
/** * Factory method to use for constructing an instance from instance of * {@link JsonInclude} */ public static Value from(JsonInclude src) { if (src == null) { return EMPTY; } Include vi = src.value(); Include ci = src.content(); if ((vi == Include.USE_DEFAULTS) && (ci == Include.USE_DEFAULTS)) { return EMPTY; } Class<?> vf = src.valueFilter(); if (vf == Void.class) { vf = null; } Class<?> cf = src.contentFilter(); if (cf == Void.class) { cf = null; } return new Value(vi, ci, vf, cf); }
/** * Mutant factory method that merges values of this value with given override * values, so that any explicitly defined inclusion in overrides has precedence over * settings of this value instance. If no overrides exist will return <code>this</code> * instance; otherwise new {@link Value} with changed inclusion values. */ public Value withOverrides(Value overrides) { if ((overrides == null) || (overrides == EMPTY)) { return this; } Include vi = overrides._valueInclusion; Include ci = overrides._contentInclusion; Class<?> vf = overrides._valueFilter; Class<?> cf = overrides._contentFilter; boolean viDiff = (vi != _valueInclusion) && (vi != Include.USE_DEFAULTS); boolean ciDiff = (ci != _contentInclusion) && (ci != Include.USE_DEFAULTS); boolean filterDiff = (vf != _valueFilter) || (cf != _valueFilter); if (viDiff) { if (ciDiff) { return new Value(vi, ci, vf, cf); } return new Value(vi, _contentInclusion, vf, cf); } else if (ciDiff) { return new Value(_valueInclusion, ci, vf, cf); } else if (filterDiff) { return new Value(_valueInclusion, _contentInclusion, vf, cf); } return this; }
/** * Factory method to use for constructing an instance from instance of * {@link JsonInclude} */ public static Value from(JsonInclude src) { if (src == null) { return EMPTY; } Include vi = src.value(); Include ci = src.content(); if ((vi == Include.USE_DEFAULTS) && (ci == Include.USE_DEFAULTS)) { return EMPTY; } Class<?> vf = src.valueFilter(); if (vf == Void.class) { vf = null; } Class<?> cf = src.contentFilter(); if (cf == Void.class) { cf = null; } return new Value(vi, ci, vf, cf); }
/** * Factory method to use for constructing an instance for components * * @since 2.9 */ public static Value construct(Include valueIncl, Include contentIncl, Class<?> valueFilter, Class<?> contentFilter) { if (valueFilter == Void.class) { valueFilter = null; } if (contentFilter == Void.class) { contentFilter = null; } if (((valueIncl == Include.USE_DEFAULTS) || (valueIncl == null)) && ((contentIncl == Include.USE_DEFAULTS) || (contentIncl == null)) && (valueFilter == null) && (contentFilter == null) ) { return EMPTY; } return new Value(valueIncl, contentIncl, valueFilter, contentFilter); }
public Value withValueInclusion(Include incl) { return (incl == _valueInclusion) ? this : new Value(incl, _contentInclusion, _valueFilter, _contentFilter); }
public Value withContentInclusion(Include incl) { return (incl == _contentInclusion) ? this : new Value(_valueInclusion, incl, _valueFilter, _contentFilter); }
/** * Factory method to use for constructing an instance for components */ public static Value construct(Include valueIncl, Include contentIncl) { if (((valueIncl == Include.USE_DEFAULTS) || (valueIncl == null)) && ((contentIncl == Include.USE_DEFAULTS) || (contentIncl == null))) { return EMPTY; } return new Value(valueIncl, contentIncl, null, null); }
public Value withValueInclusion(Include incl) { return (incl == _valueInclusion) ? this : new Value(incl, _contentInclusion, _valueFilter, _contentFilter); }
/** * Factory method to use for constructing an instance for components */ public static Value construct(Include valueIncl, Include contentIncl) { if (((valueIncl == Include.USE_DEFAULTS) || (valueIncl == null)) && ((contentIncl == Include.USE_DEFAULTS) || (contentIncl == null))) { return EMPTY; } return new Value(valueIncl, contentIncl, null, null); }
public Value withContentInclusion(Include incl) { return (incl == _contentInclusion) ? this : new Value(_valueInclusion, incl, _valueFilter, _contentFilter); }