@Override public Collection<AnnotationIntrospector> allIntrospectors() { return allIntrospectors(new ArrayList<AnnotationIntrospector>()); }
/** * Method for registering specified {@link AnnotationIntrospector} as the highest * priority introspector (will be chained with existing introspector(s) which * will be used as fallbacks for cases this introspector does not handle) * * @param introspector Annotation introspector to register. * * @since 1.7 * * @deprecated Since 1.9 use {@link #withInsertedAnnotationIntrospector(AnnotationIntrospector)} instead; * this method is deprecated as it changes state, preventing immutability of instances */ @Deprecated public final void insertAnnotationIntrospector(AnnotationIntrospector introspector) { _base = _base.withAnnotationIntrospector(AnnotationIntrospector.Pair.create(introspector, getAnnotationIntrospector())); }
mapper.setAnnotationIntrospector(primary); } else { AnnotationIntrospector pair = new AnnotationIntrospector.Pair( primary, secondary); mapper.setAnnotationIntrospector(pair);
AnnotationIntrospector pair = new AnnotationIntrospector.Pair(primary, secondary); mapper.setDeserializationConfig(mapper.getDeserializationConfig().withAnnotationIntrospector(pair) .without(DeserializationConfig.Feature.FAIL_ON_UNKNOWN_PROPERTIES)
/** * Helper method for constructing a Pair from two given introspectors (if * neither is null); or returning non-null introspector if one is null * (and return just null if both are null) * * @since 1.7 */ public static AnnotationIntrospector create(AnnotationIntrospector primary, AnnotationIntrospector secondary) { if (primary == null) { return secondary; } if (secondary == null) { return primary; } return new Pair(primary, secondary); }
/** * Helper method for constructing a Pair from two given introspectors (if * neither is null); or returning non-null introspector if one is null * (and return just null if both are null) * * @since 1.7 */ public static AnnotationIntrospector create(AnnotationIntrospector primary, AnnotationIntrospector secondary) { if (primary == null) { return secondary; } if (secondary == null) { return primary; } return new Pair(primary, secondary); }
/** * Method for registering specified {@link AnnotationIntrospector} as the highest * priority introspector (will be chained with existing introspector(s) which * will be used as fallbacks for cases this introspector does not handle) * * @param introspector Annotation introspector to register. * * @since 1.7 * * @deprecated Since 1.9 use {@link #withInsertedAnnotationIntrospector(AnnotationIntrospector)} instead; * this method is deprecated as it changes state, preventing immutability of instances */ @Deprecated public final void insertAnnotationIntrospector(AnnotationIntrospector introspector) { _base = _base.withAnnotationIntrospector(AnnotationIntrospector.Pair.create(introspector, getAnnotationIntrospector())); }
/** * Helper method for constructing a Pair from two given introspectors (if * neither is null); or returning non-null introspector if one is null * (and return just null if both are null) * * @since 1.7 */ public static AnnotationIntrospector create(AnnotationIntrospector primary, AnnotationIntrospector secondary) { if (primary == null) { return secondary; } if (secondary == null) { return primary; } return new Pair(primary, secondary); }
/** * Method for registering specified {@link AnnotationIntrospector} as the lowest * priority introspector, chained with existing introspector(s) and called * as fallback for cases not otherwise handled. * * @param introspector Annotation introspector to register. * * @since 1.7 * * @deprecated Since 1.9 use {@link #withAppendedAnnotationIntrospector(AnnotationIntrospector)} instead; * this method is deprecated as it changes state, preventing immutability of instances */ @Deprecated public final void appendAnnotationIntrospector(AnnotationIntrospector introspector) { _base = _base.withAnnotationIntrospector(AnnotationIntrospector.Pair.create(getAnnotationIntrospector(), introspector)); }
/** * Method for registering specified {@link AnnotationIntrospector} as the highest * priority introspector (will be chained with existing introspector(s) which * will be used as fallbacks for cases this introspector does not handle) * * @param introspector Annotation introspector to register. * * @since 1.7 * * @deprecated Since 1.9 use {@link #withInsertedAnnotationIntrospector(AnnotationIntrospector)} instead; * this method is deprecated as it changes state, preventing immutability of instances */ @Deprecated public final void insertAnnotationIntrospector(AnnotationIntrospector introspector) { _base = _base.withAnnotationIntrospector(AnnotationIntrospector.Pair.create(introspector, getAnnotationIntrospector())); }
/** * Method for registering specified {@link AnnotationIntrospector} as the lowest * priority introspector, chained with existing introspector(s) and called * as fallback for cases not otherwise handled. * * @param introspector Annotation introspector to register. * * @since 1.7 * * @deprecated Since 1.9 use {@link #withAppendedAnnotationIntrospector(AnnotationIntrospector)} instead; * this method is deprecated as it changes state, preventing immutability of instances */ @Deprecated public final void appendAnnotationIntrospector(AnnotationIntrospector introspector) { _base = _base.withAnnotationIntrospector(AnnotationIntrospector.Pair.create(getAnnotationIntrospector(), introspector)); }
private static ObjectMapper createObjectMapper() { ObjectMapper mapper = new ObjectMapper(); AnnotationIntrospector pair = new AnnotationIntrospector.Pair(new JaxbAnnotationIntrospector(), new JacksonAnnotationIntrospector()); SerializationConfig serializationConfig = mapper.getSerializationConfig().withSerializationInclusion(Inclusion.NON_NULL).withAnnotationIntrospector(pair); //.withDateFormat(StdDateFormat.getBlueprintISO8601Format()); DeserializationConfig deserializationConfig = mapper.getDeserializationConfig().without(Feature.FAIL_ON_UNKNOWN_PROPERTIES).withAnnotationIntrospector(pair); //.withDateFormat(StdDateFormat.getBlueprintISO8601Format()); mapper.setSerializationConfig(serializationConfig); mapper.setDeserializationConfig(deserializationConfig); return mapper; }
public static AnnotationIntrospector pair(AnnotationIntrospector a1, AnnotationIntrospector a2) { return new Pair(a1, a2); }
public static AnnotationIntrospector pair(AnnotationIntrospector a1, AnnotationIntrospector a2) { return new Pair(a1, a2); }
public Base withAppendedAnnotationIntrospector(AnnotationIntrospector ai) { return withAnnotationIntrospector(AnnotationIntrospector.Pair.create(_annotationIntrospector, ai)); }
public static AnnotationIntrospector pair(AnnotationIntrospector a1, AnnotationIntrospector a2) { return new Pair(a1, a2); }
public Base withAppendedAnnotationIntrospector(AnnotationIntrospector ai) { return withAnnotationIntrospector(AnnotationIntrospector.Pair.create(_annotationIntrospector, ai)); }
public Base withInsertedAnnotationIntrospector(AnnotationIntrospector ai) { return withAnnotationIntrospector(AnnotationIntrospector.Pair.create(ai, _annotationIntrospector)); }
public Base withInsertedAnnotationIntrospector(AnnotationIntrospector ai) { return withAnnotationIntrospector(AnnotationIntrospector.Pair.create(ai, _annotationIntrospector)); }
public static AnnotationIntrospector pair(AnnotationIntrospector a1, AnnotationIntrospector a2) { return new Pair(a1, a2); }