/** * Use {@link #DefaultObjectWrapper(DefaultObjectWrapperConfiguration, boolean)} instead if possible; * it does the same, except that it tolerates a non-{@link DefaultObjectWrapperConfiguration} configuration too. * * @since 2.3.21 */ protected DefaultObjectWrapper(BeansWrapperConfiguration bwCfg, boolean writeProtected) { super(bwCfg, writeProtected, false); DefaultObjectWrapperConfiguration dowDowCfg = bwCfg instanceof DefaultObjectWrapperConfiguration ? (DefaultObjectWrapperConfiguration) bwCfg : new DefaultObjectWrapperConfiguration(bwCfg.getIncompatibleImprovements()) { }; useAdaptersForContainers = dowDowCfg.getUseAdaptersForContainers(); useAdapterForEnumerations = useAdaptersForContainers && getIncompatibleImprovements().intValue() >= _TemplateAPI.VERSION_INT_2_3_26; forceLegacyNonListCollections = dowDowCfg.getForceLegacyNonListCollections(); iterableSupport = dowDowCfg.getIterableSupport(); finalizeConstruction(writeProtected); }
/** * Use {@link #DefaultObjectWrapper(DefaultObjectWrapperConfiguration, boolean)} instead if possible; * it does the same, except that it tolerates a non-{@link DefaultObjectWrapperConfiguration} configuration too. * * @since 2.3.21 */ protected DefaultObjectWrapper(BeansWrapperConfiguration bwCfg, boolean writeProtected) { super(bwCfg, writeProtected, false); DefaultObjectWrapperConfiguration dowDowCfg = bwCfg instanceof DefaultObjectWrapperConfiguration ? (DefaultObjectWrapperConfiguration) bwCfg : new DefaultObjectWrapperConfiguration(bwCfg.getIncompatibleImprovements()) { }; useAdaptersForContainers = dowDowCfg.getUseAdaptersForContainers(); useAdapterForEnumerations = useAdaptersForContainers && getIncompatibleImprovements().intValue() >= _TemplateAPI.VERSION_INT_2_3_26; forceLegacyNonListCollections = dowDowCfg.getForceLegacyNonListCollections(); iterableSupport = dowDowCfg.getIterableSupport(); finalizeConstruction(writeProtected); }
/** * Use {@link #DefaultObjectWrapper(DefaultObjectWrapperConfiguration, boolean)} instead if possible; * it does the same, except that it tolerates a non-{@link DefaultObjectWrapperConfiguration} configuration too. * * @since 2.3.21 */ protected DefaultObjectWrapper(BeansWrapperConfiguration bwCfg, boolean writeProtected) { super(bwCfg, writeProtected, false); DefaultObjectWrapperConfiguration dowDowCfg = bwCfg instanceof DefaultObjectWrapperConfiguration ? (DefaultObjectWrapperConfiguration) bwCfg : new DefaultObjectWrapperConfiguration(bwCfg.getIncompatibleImprovements()) { }; useAdaptersForContainers = dowDowCfg.getUseAdaptersForContainers(); useAdapterForEnumerations = useAdaptersForContainers && getIncompatibleImprovements().intValue() >= _TemplateAPI.VERSION_INT_2_3_26; forceLegacyNonListCollections = dowDowCfg.getForceLegacyNonListCollections(); iterableSupport = dowDowCfg.getIterableSupport(); finalizeConstruction(writeProtected); }