@Test public void test() { final Jackson2Configuration configuration = new Jackson2Configuration(); configuration.serializerTypeMappings = Arrays.asList(Jackson2ParserTest.IdSerializer.class.getName() + ":" + "string"); final Jackson2ConfigurationResolved resolved = Jackson2ConfigurationResolved.from(configuration, Thread.currentThread().getContextClassLoader()); Assert.assertEquals("string", resolved.serializerTypeMappings.get(Jackson2ParserTest.IdSerializer.class)); }
public static Jackson2ConfigurationResolved from(Jackson2Configuration configuration, ClassLoader classLoader) { final Jackson2ConfigurationResolved resolved = new Jackson2ConfigurationResolved(); resolved.fieldVisibility = configuration.fieldVisibility; resolved.getterVisibility = configuration.getterVisibility; resolved.isGetterVisibility = configuration.isGetterVisibility; resolved.setterVisibility = configuration.setterVisibility; resolved.creatorVisibility = configuration.creatorVisibility; resolved.fieldVisibility = configuration.fieldVisibility; resolved.shapeConfigOverrides = resolveClassMappings( configuration.shapeConfigOverrides, classLoader, Object.class, JsonFormat.Shape::valueOf); resolved.enumsUsingToString = configuration.enumsUsingToString; resolved.disableObjectIdentityFeature = configuration.disableObjectIdentityFeature; resolved.deserializerTypeMappings = resolveClassMappings( configuration.deserializerTypeMappings, classLoader, JsonDeserializer.class, Function.identity()); resolved.serializerTypeMappings = resolveClassMappings( configuration.serializerTypeMappings, classLoader, JsonSerializer.class, Function.identity()); return resolved; }
Jackson2ConfigurationResolved { public static Jackson2ConfigurationResolved from(Jackson2Configuration configuration, ClassLoader classLoader) { final Jackson2ConfigurationResolved resolved = new Jackson2ConfigurationResolved(); resolved.fieldVisibility = configuration.fieldVisibility; resolved.getterVisibility = configuration.getterVisibility; resolved.isGetterVisibility = configuration.isGetterVisibility; resolved.setterVisibility = configuration.setterVisibility; resolved.creatorVisibility = configuration.creatorVisibility; resolved.fieldVisibility = configuration.fieldVisibility; resolved.shapeConfigOverrides = resolveClassMappings( configuration.shapeConfigOverrides, classLoader, Object.class, JsonFormat.Shape::valueOf); resolved.enumsUsingToString = configuration.enumsUsingToString; resolved.disableObjectIdentityFeature = configuration.disableObjectIdentityFeature; resolved.deserializerTypeMappings = resolveClassMappings( configuration.deserializerTypeMappings, classLoader, JsonDeserializer.class, Function.identity()); resolved.serializerTypeMappings = resolveClassMappings( configuration.serializerTypeMappings, classLoader, JsonSerializer.class, Function.identity()); return resolved; } }
Jackson2ConfigurationResolved { public static Jackson2ConfigurationResolved from(Jackson2Configuration configuration, ClassLoader classLoader) { final Jackson2ConfigurationResolved resolved = new Jackson2ConfigurationResolved(); resolved.fieldVisibility = configuration.fieldVisibility; resolved.getterVisibility = configuration.getterVisibility; resolved.isGetterVisibility = configuration.isGetterVisibility; resolved.setterVisibility = configuration.setterVisibility; resolved.creatorVisibility = configuration.creatorVisibility; resolved.fieldVisibility = configuration.fieldVisibility; resolved.shapeConfigOverrides = resolveClassMappings( configuration.shapeConfigOverrides, classLoader, Object.class, JsonFormat.Shape::valueOf); resolved.enumsUsingToString = configuration.enumsUsingToString; resolved.disableObjectIdentityFeature = configuration.disableObjectIdentityFeature; resolved.deserializerTypeMappings = resolveClassMappings( configuration.deserializerTypeMappings, classLoader, JsonDeserializer.class, Function.identity()); resolved.serializerTypeMappings = resolveClassMappings( configuration.serializerTypeMappings, classLoader, JsonSerializer.class, Function.identity()); return resolved; }  }
Jackson2ConfigurationResolved { public static Jackson2ConfigurationResolved from(Jackson2Configuration configuration, ClassLoader classLoader) { final Jackson2ConfigurationResolved resolved = new Jackson2ConfigurationResolved(); resolved.fieldVisibility = configuration.fieldVisibility; resolved.getterVisibility = configuration.getterVisibility; resolved.isGetterVisibility = configuration.isGetterVisibility; resolved.setterVisibility = configuration.setterVisibility; resolved.creatorVisibility = configuration.creatorVisibility; resolved.fieldVisibility = configuration.fieldVisibility; resolved.shapeConfigOverrides = resolveClassMappings( configuration.shapeConfigOverrides, classLoader, Object.class, JsonFormat.Shape::valueOf); resolved.enumsUsingToString = configuration.enumsUsingToString; resolved.disableObjectIdentityFeature = configuration.disableObjectIdentityFeature; resolved.deserializerTypeMappings = resolveClassMappings( configuration.deserializerTypeMappings, classLoader, JsonDeserializer.class, Function.identity()); resolved.serializerTypeMappings = resolveClassMappings( configuration.serializerTypeMappings, classLoader, JsonSerializer.class, Function.identity()); return resolved; }  static Jackson2ConfigurationResolved from(Jackson2Configuration configuration, ClassLoader classLoader); void setVisibility(
            JsonAutoDetect.Visibility fieldVisibility,
            JsonAutoDetect.Visibility getterVisibility,
            JsonAutoDetect.Visibility isGetterVisibility,
            JsonAutoDetect.Visibility setterVisibility,
            JsonAutoDetect.Visibility creatorVisibility); }
Jackson2ConfigurationResolved { public static Jackson2ConfigurationResolved from(Jackson2Configuration configuration, ClassLoader classLoader) { final Jackson2ConfigurationResolved resolved = new Jackson2ConfigurationResolved(); resolved.fieldVisibility = configuration.fieldVisibility; resolved.getterVisibility = configuration.getterVisibility; resolved.isGetterVisibility = configuration.isGetterVisibility; resolved.setterVisibility = configuration.setterVisibility; resolved.creatorVisibility = configuration.creatorVisibility; resolved.fieldVisibility = configuration.fieldVisibility; resolved.shapeConfigOverrides = resolveClassMappings( configuration.shapeConfigOverrides, classLoader, Object.class, JsonFormat.Shape::valueOf); resolved.enumsUsingToString = configuration.enumsUsingToString; resolved.disableObjectIdentityFeature = configuration.disableObjectIdentityFeature; resolved.deserializerTypeMappings = resolveClassMappings( configuration.deserializerTypeMappings, classLoader, JsonDeserializer.class, Function.identity()); resolved.serializerTypeMappings = resolveClassMappings( configuration.serializerTypeMappings, classLoader, JsonSerializer.class, Function.identity()); return resolved; }  static Jackson2ConfigurationResolved from(Jackson2Configuration configuration, ClassLoader classLoader); void setVisibility(
            JsonAutoDetect.Visibility fieldVisibility,
            JsonAutoDetect.Visibility getterVisibility,
            JsonAutoDetect.Visibility isGetterVisibility,
            JsonAutoDetect.Visibility setterVisibility,
            JsonAutoDetect.Visibility creatorVisibility); public JsonAutoDetect.Visibility fieldVisibility; public JsonAutoDetect.Visibility getterVisibility; public JsonAutoDetect.Visibility isGetterVisibility; public JsonAutoDetect.Visibility setterVisibility; public JsonAutoDetect.Visibility creatorVisibility; public Map<Class<?>, JsonFormat.Shape> shapeConfigOverrides; public boolean enumsUsingToString; public boolean disableObjectIdentityFeature; @SuppressWarnings("rawtypes")
    public Map<Class<? extends JsonSerializer>, String> serializerTypeMappings; @SuppressWarnings("rawtypes")
    public Map<Class<? extends JsonDeserializer>, String> deserializerTypeMappings; }