本文整理汇总了Java中org.codehaus.jackson.map.Module类的典型用法代码示例。如果您正苦于以下问题:Java Module类的具体用法?Java Module怎么用?Java Module使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Module类属于org.codehaus.jackson.map包,在下文中一共展示了Module类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setupModule
import org.codehaus.jackson.map.Module; //导入依赖的package包/类
public void setupModule(Module.SetupContext paramSetupContext)
{
if (this._serializers != null)
paramSetupContext.addSerializers(this._serializers);
if (this._deserializers != null)
paramSetupContext.addDeserializers(this._deserializers);
if (this._keySerializers != null)
paramSetupContext.addKeySerializers(this._keySerializers);
if (this._keyDeserializers != null)
paramSetupContext.addKeyDeserializers(this._keyDeserializers);
if (this._abstractTypes != null)
paramSetupContext.addAbstractTypeResolver(this._abstractTypes);
if (this._valueInstantiators != null)
paramSetupContext.addValueInstantiators(this._valueInstantiators);
if (this._mixins != null)
{
Iterator localIterator = this._mixins.entrySet().iterator();
while (localIterator.hasNext())
{
Map.Entry localEntry = (Map.Entry)localIterator.next();
paramSetupContext.setMixInAnnotations((Class)localEntry.getKey(), (Class)localEntry.getValue());
}
}
}
示例2: setupModule
import org.codehaus.jackson.map.Module; //导入依赖的package包/类
public void setupModule(Module.SetupContext paramSetupContext)
{
if (this._serializers != null)
paramSetupContext.addSerializers(this._serializers);
if (this._deserializers != null)
paramSetupContext.addDeserializers(this._deserializers);
if (this._keySerializers != null)
paramSetupContext.addKeySerializers(this._keySerializers);
if (this._keyDeserializers != null)
paramSetupContext.addKeyDeserializers(this._keyDeserializers);
if (this._abstractTypes != null)
paramSetupContext.addAbstractTypeResolver(this._abstractTypes);
}
示例3: init
import org.codehaus.jackson.map.Module; //导入依赖的package包/类
@PostConstruct
public void init() {
Collection<ObjectMapper> mappers = BeanFactoryUtils
.beansOfTypeIncludingAncestors(this.beanFactory, ObjectMapper.class)
.values();
Collection<Module> modules = BeanFactoryUtils.beansOfTypeIncludingAncestors(
this.beanFactory, Module.class).values();
for (ObjectMapper mapper : mappers) {
mapper.registerModule(modules.iterator().next()); // there can be only one!
break;
}
}
示例4: jaxsonModule
import org.codehaus.jackson.map.Module; //导入依赖的package包/类
@Bean
@ConditionalOnMissingBean
public Module jaxsonModule() {
return new SimpleModule("legacyJacksonModule", Version.unknownVersion());
}
示例5: setupModule
import org.codehaus.jackson.map.Module; //导入依赖的package包/类
public final void setupModule(Module.SetupContext paramSetupContext)
{
paramSetupContext.addDeserializers(new a());
}
示例6: setModule
import org.codehaus.jackson.map.Module; //导入依赖的package包/类
/**
* Sets the Jackson Module to be used.
*
* @param module Module
*/
public void setModule(Module module)
{
this.module = module;
}