/** * Method for enabling or disabling specified feature. * * @deprecated Since 1.9, it is preferable to use {@link #with} and * {@link #without} methods instead; * this method is deprecated as it modifies current instance instead of * creating a new one (as the goal is to make this class immutable) */ @SuppressWarnings("deprecation") @Deprecated public void set(CFG f, boolean state) { if (state) { enable(f); } else { disable(f); } } }
/** * One thing to note is that this will set {@link Feature#WRITE_DATES_AS_TIMESTAMPS} * to false (if null format set), or true (if non-null format) * * @deprecated Since 1.8, use {@link #withDateFormat} instead. */ @SuppressWarnings("deprecation") @Override @Deprecated public final void setDateFormat(DateFormat df) { super.setDateFormat(df); set(Feature.WRITE_DATES_AS_TIMESTAMPS, (df == null)); }
/** * @deprecated Since 1.9, it is preferable to use {@link #without} and {@link #with} instead; * this method is deprecated as it modifies current instance instead of * creating a new one (as the goal is to make this class immutable) */ @Deprecated @Override public void set(SerializationConfig.Feature f, boolean state) { super.set(f, state); }
/** * Method for enabling or disabling specified feature. * * @deprecated Since 1.9, it is preferable to use {@link #with} and * {@link #without} methods instead; * this method is deprecated as it modifies current instance instead of * creating a new one (as the goal is to make this class immutable) */ @SuppressWarnings("deprecation") @Deprecated public final void set(CFG f, boolean state) { if (state) { enable(f); } else { disable(f); } } }
/** * Method for enabling or disabling specified feature. * * @deprecated Since 1.9, it is preferable to use {@link #with} and * {@link #without} methods instead; * this method is deprecated as it modifies current instance instead of * creating a new one (as the goal is to make this class immutable) */ @SuppressWarnings("deprecation") @Deprecated public void set(CFG f, boolean state) { if (state) { enable(f); } else { disable(f); } } }
@Override public VisibilityChecker<?> getDefaultVisibilityChecker() { VisibilityChecker<?> vchecker = super.getDefaultVisibilityChecker(); if (!isEnabled(SerializationConfig.Feature.AUTO_DETECT_GETTERS)) { vchecker = vchecker.withGetterVisibility(Visibility.NONE); } // then global overrides (disabling) if (!isEnabled(SerializationConfig.Feature.AUTO_DETECT_IS_GETTERS)) { vchecker = vchecker.withIsGetterVisibility(Visibility.NONE); } if (!isEnabled(SerializationConfig.Feature.AUTO_DETECT_FIELDS)) { vchecker = vchecker.withFieldVisibility(Visibility.NONE); } return vchecker; }
/** * Method for getting {@link AnnotationIntrospector} configured * to introspect annotation values used for configuration. */ @Override public AnnotationIntrospector getAnnotationIntrospector() { /* 29-Jul-2009, tatu: it's now possible to disable use of * annotations; can be done using "no-op" introspector */ if (isEnabled(Feature.USE_ANNOTATIONS)) { return super.getAnnotationIntrospector(); } return NopAnnotationIntrospector.instance; }
@Override public VisibilityChecker<?> getDefaultVisibilityChecker() { VisibilityChecker<?> vchecker = super.getDefaultVisibilityChecker(); if (!isEnabled(SerializationConfig.Feature.AUTO_DETECT_GETTERS)) { vchecker = vchecker.withGetterVisibility(Visibility.NONE); } // then global overrides (disabling) if (!isEnabled(SerializationConfig.Feature.AUTO_DETECT_IS_GETTERS)) { vchecker = vchecker.withIsGetterVisibility(Visibility.NONE); } if (!isEnabled(SerializationConfig.Feature.AUTO_DETECT_FIELDS)) { vchecker = vchecker.withFieldVisibility(Visibility.NONE); } return vchecker; }
@Override public VisibilityChecker<?> getDefaultVisibilityChecker() { VisibilityChecker<?> vchecker = super.getDefaultVisibilityChecker(); if (!isEnabled(DeserializationConfig.Feature.AUTO_DETECT_SETTERS)) { vchecker = vchecker.withSetterVisibility(Visibility.NONE); } if (!isEnabled(DeserializationConfig.Feature.AUTO_DETECT_CREATORS)) { vchecker = vchecker.withCreatorVisibility(Visibility.NONE); } if (!isEnabled(DeserializationConfig.Feature.AUTO_DETECT_FIELDS)) { vchecker = vchecker.withFieldVisibility(Visibility.NONE); } return vchecker; }
@Override public VisibilityChecker<?> getDefaultVisibilityChecker() { VisibilityChecker<?> vchecker = super.getDefaultVisibilityChecker(); if (!isEnabled(DeserializationConfig.Feature.AUTO_DETECT_SETTERS)) { vchecker = vchecker.withSetterVisibility(Visibility.NONE); } if (!isEnabled(DeserializationConfig.Feature.AUTO_DETECT_CREATORS)) { vchecker = vchecker.withCreatorVisibility(Visibility.NONE); } if (!isEnabled(DeserializationConfig.Feature.AUTO_DETECT_FIELDS)) { vchecker = vchecker.withFieldVisibility(Visibility.NONE); } return vchecker; }
/** * Method for getting {@link AnnotationIntrospector} configured * to introspect annotation values used for configuration. */ @Override public AnnotationIntrospector getAnnotationIntrospector() { /* 29-Jul-2009, tatu: it's now possible to disable use of * annotations; can be done using "no-op" introspector */ if (isEnabled(Feature.USE_ANNOTATIONS)) { return super.getAnnotationIntrospector(); } return NopAnnotationIntrospector.instance; }
/** * One thing to note is that this will set {@link Feature#WRITE_DATES_AS_TIMESTAMPS} * to false (if null format set), or true (if non-null format) * * @deprecated Since 1.8, use {@link #withDateFormat} instead. */ @SuppressWarnings("deprecation") @Override @Deprecated public final void setDateFormat(DateFormat df) { super.setDateFormat(df); set(Feature.WRITE_DATES_AS_TIMESTAMPS, (df == null)); }
/** * One thing to note is that this will set {@link Feature#WRITE_DATES_AS_TIMESTAMPS} * to false (if null format set), or true (if non-null format) * * @deprecated Since 1.8, use {@link #withDateFormat} instead. */ @SuppressWarnings("deprecation") @Override @Deprecated public final void setDateFormat(DateFormat df) { super.setDateFormat(df); set(Feature.WRITE_DATES_AS_TIMESTAMPS, (df == null)); }
@Override public AnnotationIntrospector getAnnotationIntrospector() { /* 29-Jul-2009, tatu: it's now possible to disable use of * annotations; can be done using "no-op" introspector */ if (isEnabled(Feature.USE_ANNOTATIONS)) { return super.getAnnotationIntrospector(); } return AnnotationIntrospector.nopInstance(); }
/** * @deprecated Since 1.9, it is preferable to use {@link #with} instead; * this method is deprecated as it modifies current instance instead of * creating a new one (as the goal is to make this class immutable) */ @Deprecated @Override public void enable(DeserializationConfig.Feature f) { super.enable(f); }
/** * @deprecated Since 1.9, it is preferable to use {@link #without} and {@link #with} instead; * this method is deprecated as it modifies current instance instead of * creating a new one (as the goal is to make this class immutable) */ @Deprecated @Override public void set(SerializationConfig.Feature f, boolean state) { super.set(f, state); }
/** * @deprecated Since 1.9, it is preferable to use {@link #without} instead; * this method is deprecated as it modifies current instance instead of * creating a new one (as the goal is to make this class immutable) */ @Deprecated @Override public void disable(SerializationConfig.Feature f) { super.disable(f); }
@Override public AnnotationIntrospector getAnnotationIntrospector() { /* 29-Jul-2009, tatu: it's now possible to disable use of * annotations; can be done using "no-op" introspector */ if (isEnabled(Feature.USE_ANNOTATIONS)) { return super.getAnnotationIntrospector(); } return AnnotationIntrospector.nopInstance(); }
/** * @deprecated Since 1.9, it is preferable to use {@link #without} and {@link #with} instead; * this method is deprecated as it modifies current instance instead of * creating a new one (as the goal is to make this class immutable) */ @Deprecated @Override public void set(DeserializationConfig.Feature f, boolean state) { super.set(f, state); }
/** * @deprecated Since 1.9, it is preferable to use {@link #without} instead; * this method is deprecated as it modifies current instance instead of * creating a new one (as the goal is to make this class immutable) */ @Deprecated @Override public void disable(DeserializationConfig.Feature f) { super.disable(f); }