• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java SerializerFactoryConfig类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.fasterxml.jackson.databind.cfg.SerializerFactoryConfig的典型用法代码示例。如果您正苦于以下问题:Java SerializerFactoryConfig类的具体用法?Java SerializerFactoryConfig怎么用?Java SerializerFactoryConfig使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



SerializerFactoryConfig类属于com.fasterxml.jackson.databind.cfg包,在下文中一共展示了SerializerFactoryConfig类的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: withConfig

import com.fasterxml.jackson.databind.cfg.SerializerFactoryConfig; //导入依赖的package包/类
/**
 * Method used by module registration functionality, to attach additional
 * serializer providers into this serializer factory. This is typically
 * handled by constructing a new instance with additional serializers,
 * to ensure thread-safe access.
 */
@Override
public SerializerFactory withConfig(SerializerFactoryConfig config)
{
    if (_factoryConfig == config) {
        return this;
    }
    /* 22-Nov-2010, tatu: Handling of subtypes is tricky if we do immutable-with-copy-ctor;
     *    and we pretty much have to here either choose between losing subtype instance
     *    when registering additional serializers, or losing serializers.
     *    Instead, let's actually just throw an error if this method is called when subtype
     *    has not properly overridden this method; this to indicate problem as soon as possible.
     */
    if (getClass() != BeanSerializerFactory.class) {
        throw new IllegalStateException("Subtype of BeanSerializerFactory ("+getClass().getName()
                +") has not properly overridden method 'withAdditionalSerializers': can not instantiate subtype with "
                +"additional serializer definitions");
    }
    return new BeanSerializerFactory(config);
}
 
开发者ID:joyplus,项目名称:joyplus-tv,代码行数:26,代码来源:BeanSerializerFactory.java


示例2: ErrorContractSerializationFactory

import com.fasterxml.jackson.databind.cfg.SerializerFactoryConfig; //导入依赖的package包/类
protected ErrorContractSerializationFactory(SerializerFactoryConfig config,
                                            boolean excludeEmptyMetadataFromJson,
                                            boolean serializeErrorCodeFieldAsIntegerIfPossible) {
    super(config);
    this.excludeEmptyMetadataFromJson = excludeEmptyMetadataFromJson;
    this.serializeErrorCodeFieldAsIntegerIfPossible = serializeErrorCodeFieldAsIntegerIfPossible;
}
 
开发者ID:Nike-Inc,项目名称:backstopper,代码行数:8,代码来源:JsonUtilWithDefaultErrorContractDTOSupport.java


示例3: withConfig

import com.fasterxml.jackson.databind.cfg.SerializerFactoryConfig; //导入依赖的package包/类
public SerializerFactory withConfig(SerializerFactoryConfig paramSerializerFactoryConfig)
{
  if (this._factoryConfig == paramSerializerFactoryConfig)
    return this;
  if (getClass() != BeanSerializerFactory.class)
    throw new IllegalStateException("Subtype of BeanSerializerFactory (" + getClass().getName() + ") has not properly overridden method 'withAdditionalSerializers': can not instantiate subtype with additional serializer definitions");
  return new BeanSerializerFactory(paramSerializerFactoryConfig);
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:9,代码来源:BeanSerializerFactory.java


示例4: DelegatingSerializerFactory

import com.fasterxml.jackson.databind.cfg.SerializerFactoryConfig; //导入依赖的package包/类
protected DelegatingSerializerFactory(SerializerFactoryConfig config) {
	super(config);
}
 
开发者ID:langtianya,项目名称:spring4-understanding,代码行数:4,代码来源:MappingJackson2JsonViewTests.java


示例5: getSerializerFactoryConfig

import com.fasterxml.jackson.databind.cfg.SerializerFactoryConfig; //导入依赖的package包/类
private static SerializerFactoryConfig getSerializerFactoryConfig(ObjectMapper objectMapper) {
	return ((BasicSerializerFactory) objectMapper.getSerializerFactory()).getFactoryConfig();
}
 
开发者ID:langtianya,项目名称:spring4-understanding,代码行数:4,代码来源:Jackson2ObjectMapperBuilderTests.java


示例6: HibernateBeanSerializerFactory

import com.fasterxml.jackson.databind.cfg.SerializerFactoryConfig; //导入依赖的package包/类
protected HibernateBeanSerializerFactory(SerializerFactoryConfig config) {
	super(config);
}
 
开发者ID:openwide-java,项目名称:owsi-core-parent,代码行数:4,代码来源:HibernateBeanSerializerFactory.java


示例7: withConfig

import com.fasterxml.jackson.databind.cfg.SerializerFactoryConfig; //导入依赖的package包/类
@Override
public SerializerFactory withConfig(SerializerFactoryConfig config) {
	return new HibernateBeanSerializerFactory(config);
}
 
开发者ID:openwide-java,项目名称:owsi-core-parent,代码行数:5,代码来源:HibernateBeanSerializerFactory.java


示例8: BeanSerializerFactory

import com.fasterxml.jackson.databind.cfg.SerializerFactoryConfig; //导入依赖的package包/类
protected BeanSerializerFactory(SerializerFactoryConfig paramSerializerFactoryConfig)
{
  super(paramSerializerFactoryConfig);
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:5,代码来源:BeanSerializerFactory.java


示例9: getFactoryConfig

import com.fasterxml.jackson.databind.cfg.SerializerFactoryConfig; //导入依赖的package包/类
public SerializerFactoryConfig getFactoryConfig()
{
  return this._factoryConfig;
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:5,代码来源:BasicSerializerFactory.java


示例10: withConfig

import com.fasterxml.jackson.databind.cfg.SerializerFactoryConfig; //导入依赖的package包/类
@Override
public SerializerFactory withConfig(SerializerFactoryConfig config) {
	return null;
}
 
开发者ID:deathspeeder,项目名称:class-guard,代码行数:5,代码来源:MappingJackson2JsonViewTests.java


示例11: getSerializerFactoryConfig

import com.fasterxml.jackson.databind.cfg.SerializerFactoryConfig; //导入依赖的package包/类
/**
 * TODO: Remove use of {@link DirectFieldAccessor} with getters.
 * See <a href="https://github.com/FasterXML/jackson-databind/issues/65">issue#65</a>.
 */
private static final SerializerFactoryConfig getSerializerFactoryConfig(ObjectMapper objectMapper) {
	Object factoryProp = new DirectFieldAccessor(objectMapper).getPropertyValue("_serializerFactory");
	return (SerializerFactoryConfig) new DirectFieldAccessor(factoryProp).getPropertyValue("_factoryConfig");
}
 
开发者ID:deathspeeder,项目名称:class-guard,代码行数:9,代码来源:Jackson2ObjectMapperFactoryBeanTests.java


示例12: RmBeanSerializerFactory

import com.fasterxml.jackson.databind.cfg.SerializerFactoryConfig; //导入依赖的package包/类
protected RmBeanSerializerFactory(SerializerFactoryConfig config) {
	super(config);
}
 
开发者ID:quickbundle,项目名称:qb-core,代码行数:4,代码来源:RmBeanSerializerFactory.java


示例13: BeanSerializerFactory

import com.fasterxml.jackson.databind.cfg.SerializerFactoryConfig; //导入依赖的package包/类
/**
 * Constructor for creating instances with specified configuration.
 */
protected BeanSerializerFactory(SerializerFactoryConfig config)
{
    super(config);
}
 
开发者ID:joyplus,项目名称:joyplus-tv,代码行数:8,代码来源:BeanSerializerFactory.java


示例14: BasicSerializerFactory

import com.fasterxml.jackson.databind.cfg.SerializerFactoryConfig; //导入依赖的package包/类
/**
 * We will provide default constructor to allow sub-classing,
 * but make it protected so that no non-singleton instances of
 * the class will be instantiated.
 */
protected BasicSerializerFactory(SerializerFactoryConfig config) {
    _factoryConfig = (config == null) ? new SerializerFactoryConfig() : config;
}
 
开发者ID:joyplus,项目名称:joyplus-tv,代码行数:9,代码来源:BasicSerializerFactory.java


示例15: getFactoryConfig

import com.fasterxml.jackson.databind.cfg.SerializerFactoryConfig; //导入依赖的package包/类
/**
 * Method for getting current {@link SerializerFactoryConfig}.
  *<p>
 * Note that since instances are immutable, you can NOT change settings
 * by accessing an instance and calling methods: this will simply create
 * new instance of config object.
 */
public SerializerFactoryConfig getFactoryConfig() {
    return _factoryConfig;
}
 
开发者ID:joyplus,项目名称:joyplus-tv,代码行数:11,代码来源:BasicSerializerFactory.java


示例16: withConfig

import com.fasterxml.jackson.databind.cfg.SerializerFactoryConfig; //导入依赖的package包/类
/**
 * Method used for creating a new instance of this factory, but with different
 * configuration. Reason for specifying factory method (instead of plain constructor)
 * is to allow proper sub-classing of factories.
 *<p>
 * Note that custom sub-classes generally <b>must override</b> implementation
 * of this method, as it usually requires instantiating a new instance of
 * factory type. Check out javadocs for
 * {@link com.fasterxml.jackson.databind.ser.BeanSerializerFactory} for more details.
 */
public abstract SerializerFactory withConfig(SerializerFactoryConfig config);
 
开发者ID:joyplus,项目名称:joyplus-tv,代码行数:12,代码来源:BasicSerializerFactory.java


示例17: withConfig

import com.fasterxml.jackson.databind.cfg.SerializerFactoryConfig; //导入依赖的package包/类
public abstract SerializerFactory withConfig(SerializerFactoryConfig paramSerializerFactoryConfig); 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:2,代码来源:BasicSerializerFactory.java



注:本文中的com.fasterxml.jackson.databind.cfg.SerializerFactoryConfig类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Descriptor类代码示例发布时间:2022-05-23
下一篇:
Java Regex类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap