public void setIgnorableProperties(String[] ignorable) { _ignorableProperties = (ignorable == null || ignorable.length == 0) ? null : ArrayBuilders.arrayToSet(ignorable); }
@Deprecated // since 2.8, remove soon protected BeanSerializerBase(BeanSerializerBase src, String[] toIgnore) { this(src, ArrayBuilders.arrayToSet(toIgnore)); }
/** * Mutant factory used for creating a new instance with additional * set of properties to ignore (from properties this instance otherwise has) * * @deprecated since 2.8 */ @Deprecated protected BeanSerializerBase withIgnorals(String[] toIgnore) { return withIgnorals(ArrayBuilders.arrayToSet(toIgnore)); }
/** * @since 2.3 * * @deprecated Since 2.8 use the other overload */ @Deprecated // since 2.8 public static MapSerializer construct(String[] ignoredList, JavaType mapType, boolean staticValueType, TypeSerializer vts, JsonSerializer<Object> keySerializer, JsonSerializer<Object> valueSerializer, Object filterId) { Set<String> ignoredEntries = ArrayBuilders.arrayToSet(ignoredList); return construct(ignoredEntries, mapType, staticValueType, vts, keySerializer, valueSerializer, filterId); }
public void setIgnorableProperties(String[] ignorable) { _ignorableProperties = (ignorable == null || ignorable.length == 0) ? null : ArrayBuilders.arrayToSet(ignorable); }
public void setIgnorableProperties(String[] ignorable) { _ignorableProperties = (ignorable == null || ignorable.length == 0) ? null : ArrayBuilders.arrayToSet(ignorable); }
public void setIgnorableProperties(String[] ignorable) { _ignorableProperties = (ignorable == null || ignorable.length == 0) ? null : ArrayBuilders.arrayToSet(ignorable); }
public void setIgnorableProperties(String[] ignorable) { _ignorableProperties = (ignorable == null || ignorable.length == 0) ? null : ArrayBuilders.arrayToSet(ignorable); }
public void setIgnorableProperties(String[] ignorable) { _ignorableProperties = (ignorable == null || ignorable.length == 0) ? null : ArrayBuilders.arrayToSet(ignorable); }
public void setIgnorableProperties(String[] ignorable) { _ignorableProperties = (ignorable == null || ignorable.length == 0) ? null : ArrayBuilders.arrayToSet(ignorable); }
@Deprecated // since 2.8, remove soon protected BeanSerializerBase(BeanSerializerBase src, String[] toIgnore) { this(src, ArrayBuilders.arrayToSet(toIgnore)); }
@Deprecated // since 2.8, remove soon protected BeanSerializerBase(BeanSerializerBase src, String[] toIgnore) { this(src, ArrayBuilders.arrayToSet(toIgnore)); }
/** * Mutant factory used for creating a new instance with additional * set of properties to ignore (from properties this instance otherwise has) * * @deprecated since 2.8 */ @Deprecated protected BeanSerializerBase withIgnorals(String[] toIgnore) { return withIgnorals(ArrayBuilders.arrayToSet(toIgnore)); }
/** * Mutant factory used for creating a new instance with additional * set of properties to ignore (from properties this instance otherwise has) * * @deprecated since 2.8 */ @Deprecated protected BeanSerializerBase withIgnorals(String[] toIgnore) { return withIgnorals(ArrayBuilders.arrayToSet(toIgnore)); }
/** * @since 2.3 * * @deprecated Since 2.8 use the other overload */ @Deprecated // since 2.8 public static MapSerializer construct(String[] ignoredList, JavaType mapType, boolean staticValueType, TypeSerializer vts, JsonSerializer<Object> keySerializer, JsonSerializer<Object> valueSerializer, Object filterId) { Set<String> ignoredEntries = ArrayBuilders.arrayToSet(ignoredList); return construct(ignoredEntries, mapType, staticValueType, vts, keySerializer, valueSerializer, filterId); }
/** * @since 2.3 * * @deprecated Since 2.8 use the other overload */ @Deprecated // since 2.8 public static MapSerializer construct(String[] ignoredList, JavaType mapType, boolean staticValueType, TypeSerializer vts, JsonSerializer<Object> keySerializer, JsonSerializer<Object> valueSerializer, Object filterId) { Set<String> ignoredEntries = (ignoredList == null || ignoredList.length == 0) ? null : ArrayBuilders.arrayToSet(ignoredList); return construct(ignoredEntries, mapType, staticValueType, vts, keySerializer, valueSerializer, filterId); }
/** * Overridable method that can filter out properties. Default implementation * checks annotations class may have. */ protected List<BeanPropertyWriter> filterBeanProperties(SerializationConfig config, BeanDescription beanDesc, List<BeanPropertyWriter> props) { AnnotationIntrospector intr = config.getAnnotationIntrospector(); AnnotatedClass ac = beanDesc.getClassInfo(); String[] ignored = intr.findPropertiesToIgnore(ac); if (ignored != null && ignored.length > 0) { HashSet<String> ignoredSet = ArrayBuilders.arrayToSet(ignored); Iterator<BeanPropertyWriter> it = props.iterator(); while (it.hasNext()) { if (ignoredSet.contains(it.next().getName())) { it.remove(); } } } return props; }
/** * Overridable method that can filter out properties. Default implementation * checks annotations class may have. */ protected List<BeanPropertyWriter> filterBeanProperties(SerializationConfig config, BeanDescription beanDesc, List<BeanPropertyWriter> props) { AnnotationIntrospector intr = config.getAnnotationIntrospector(); AnnotatedClass ac = beanDesc.getClassInfo(); String[] ignored = intr.findPropertiesToIgnore(ac); if (ignored != null && ignored.length > 0) { HashSet<String> ignoredSet = ArrayBuilders.arrayToSet(ignored); Iterator<BeanPropertyWriter> it = props.iterator(); while (it.hasNext()) { if (ignoredSet.contains(it.next().getName())) { it.remove(); } } } return props; }
/** * Overridable method that can filter out properties. Default implementation * checks annotations class may have. */ protected List<BeanPropertyWriter> filterBeanProperties(SerializationConfig config, BeanDescription beanDesc, List<BeanPropertyWriter> props) { AnnotationIntrospector intr = config.getAnnotationIntrospector(); AnnotatedClass ac = beanDesc.getClassInfo(); String[] ignored = intr.findPropertiesToIgnore(ac); if (ignored != null && ignored.length > 0) { HashSet<String> ignoredSet = ArrayBuilders.arrayToSet(ignored); Iterator<BeanPropertyWriter> it = props.iterator(); while (it.hasNext()) { if (ignoredSet.contains(it.next().getName())) { it.remove(); } } } return props; }
@Override public JsonSerializer<?> findMapLikeSerializer(SerializationConfig config, MapLikeType type, BeanDescription beanDesc, JsonSerializer<Object> keySerializer, TypeSerializer elementTypeSerializer, JsonSerializer<Object> elementValueSerializer) { if (Multimap.class.isAssignableFrom(type.getRawClass())) { final AnnotationIntrospector intr = config.getAnnotationIntrospector(); Object filterId = intr.findFilterId((Annotated)beanDesc.getClassInfo()); String[] ignored = intr.findPropertiesToIgnore(beanDesc.getClassInfo(), true); HashSet<String> ignoredEntries = (ignored == null || ignored.length == 0) ? null : ArrayBuilders.arrayToSet(ignored); return new MultimapSerializer(type, beanDesc, keySerializer, elementTypeSerializer, elementValueSerializer, ignoredEntries, filterId); } return null; }