本文整理汇总了Java中com.fasterxml.jackson.databind.ser.impl.ObjectIdWriter类的典型用法代码示例。如果您正苦于以下问题:Java ObjectIdWriter类的具体用法?Java ObjectIdWriter怎么用?Java ObjectIdWriter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ObjectIdWriter类属于com.fasterxml.jackson.databind.ser.impl包,在下文中一共展示了ObjectIdWriter类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: _serializeWithObjectId
import com.fasterxml.jackson.databind.ser.impl.ObjectIdWriter; //导入依赖的package包/类
public final void _serializeWithObjectId(Object paramObject, JsonGenerator paramJsonGenerator, SerializerProvider paramSerializerProvider, boolean paramBoolean)
{
ObjectIdWriter localObjectIdWriter = this._objectIdWriter;
WritableObjectId localWritableObjectId = paramSerializerProvider.findObjectId(paramObject, localObjectIdWriter.generator);
if (localWritableObjectId.writeAsId(paramJsonGenerator, paramSerializerProvider, localObjectIdWriter))
return;
Object localObject = localWritableObjectId.generateId(paramObject);
if (localObjectIdWriter.alwaysAsId)
{
localObjectIdWriter.serializer.serialize(localObject, paramJsonGenerator, paramSerializerProvider);
return;
}
if (paramBoolean)
paramJsonGenerator.writeStartObject();
localWritableObjectId.writeAsField(paramJsonGenerator, paramSerializerProvider, localObjectIdWriter);
if (this._propertyFilterId != null)
serializeFieldsFiltered(paramObject, paramJsonGenerator, paramSerializerProvider);
else
serializeFields(paramObject, paramJsonGenerator, paramSerializerProvider);
if (paramBoolean)
paramJsonGenerator.writeEndObject();
}
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:23,代码来源:BeanSerializerBase.java
示例2: BeanSerializerBase
import com.fasterxml.jackson.databind.ser.impl.ObjectIdWriter; //导入依赖的package包/类
public BeanSerializerBase(BeanSerializerBase paramBeanSerializerBase, ObjectIdWriter paramObjectIdWriter)
{
super(paramBeanSerializerBase._handledType);
this._props = paramBeanSerializerBase._props;
this._filteredProps = paramBeanSerializerBase._filteredProps;
this._typeId = paramBeanSerializerBase._typeId;
this._anyGetterWriter = paramBeanSerializerBase._anyGetterWriter;
this._objectIdWriter = paramObjectIdWriter;
this._propertyFilterId = paramBeanSerializerBase._propertyFilterId;
this._serializationShape = paramBeanSerializerBase._serializationShape;
}
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:12,代码来源:BeanSerializerBase.java
示例3: constructObjectIdHandler
import com.fasterxml.jackson.databind.ser.impl.ObjectIdWriter; //导入依赖的package包/类
protected ObjectIdWriter constructObjectIdHandler(SerializerProvider paramSerializerProvider, BeanDescription paramBeanDescription, List<BeanPropertyWriter> paramList)
{
ObjectIdInfo localObjectIdInfo = paramBeanDescription.getObjectIdInfo();
if (localObjectIdInfo == null)
return null;
Class localClass = localObjectIdInfo.getGeneratorType();
if (localClass == ObjectIdGenerators.PropertyGenerator.class)
{
String str = localObjectIdInfo.getPropertyName();
int i = 0;
int j = paramList.size();
BeanPropertyWriter localBeanPropertyWriter;
while (true)
{
if (i == j)
throw new IllegalArgumentException("Invalid Object Id definition for " + paramBeanDescription.getBeanClass().getName() + ": can not find property with name '" + str + "'");
localBeanPropertyWriter = (BeanPropertyWriter)paramList.get(i);
if (str.equals(localBeanPropertyWriter.getName()))
{
if (i <= 0)
break;
paramList.remove(i);
paramList.add(0, localBeanPropertyWriter);
break;
}
i++;
}
return ObjectIdWriter.construct(localBeanPropertyWriter.getType(), null, new PropertyBasedObjectIdGenerator(localObjectIdInfo, localBeanPropertyWriter), localObjectIdInfo.getAlwaysAsId());
}
JavaType localJavaType1 = paramSerializerProvider.constructType(localClass);
JavaType localJavaType2 = paramSerializerProvider.getTypeFactory().findTypeParameters(localJavaType1, ObjectIdGenerator.class)[0];
ObjectIdGenerator localObjectIdGenerator = paramSerializerProvider.objectIdGeneratorInstance(paramBeanDescription.getClassInfo(), localObjectIdInfo);
return ObjectIdWriter.construct(localJavaType2, localObjectIdInfo.getPropertyName(), localObjectIdGenerator, localObjectIdInfo.getAlwaysAsId());
}
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:35,代码来源:BeanSerializerFactory.java
示例4: withObjectIdWriter
import com.fasterxml.jackson.databind.ser.impl.ObjectIdWriter; //导入依赖的package包/类
@Override
public BeanSerializerBase withObjectIdWriter(ObjectIdWriter objectIdWriter) {
return new ResourceDecoratorSerializer<>(
this,
objectIdWriter,
resourceContext,
resourceDecorator
);
}
开发者ID:nemerosa,项目名称:ontrack,代码行数:10,代码来源:ResourceDecoratorSerializer.java
示例5: BeanSerializerBase
import com.fasterxml.jackson.databind.ser.impl.ObjectIdWriter; //导入依赖的package包/类
protected BeanSerializerBase(BeanSerializerBase src, ObjectIdWriter objectIdWriter)
{
super(src._handledType);
_props = src._props;
_filteredProps = src._filteredProps;
_typeId = src._typeId;
_anyGetterWriter = src._anyGetterWriter;
_objectIdWriter = objectIdWriter;
_propertyFilterId = src._propertyFilterId;
_serializationShape = src._serializationShape;
}
开发者ID:joyplus,项目名称:joyplus-tv,代码行数:13,代码来源:BeanSerializerBase.java
示例6: serializeWithObjectId
import com.fasterxml.jackson.databind.ser.impl.ObjectIdWriter; //导入依赖的package包/类
private final void serializeWithObjectId(Object bean,
JsonGenerator jgen, SerializerProvider provider)
throws IOException, JsonGenerationException
{
final ObjectIdWriter w = _objectIdWriter;
WritableObjectId oid = provider.findObjectId(bean, w.generator);
Object id = oid.id;
if (id != null) { // have seen before; serialize just id
oid.serializer.serialize(id, jgen, provider);
return;
}
// if not, bit more work:
oid.serializer = w.serializer;
oid.id = id = oid.generator.generateId(bean);
// possibly. Or maybe not:
if (w.alwaysAsId) {
oid.serializer.serialize(id, jgen, provider);
return;
}
// If not, need to inject the id:
jgen.writeStartObject();
SerializedString name = w.propertyName;
if (name != null) {
jgen.writeFieldName(name);
w.serializer.serialize(id, jgen, provider);
}
if (_propertyFilterId != null) {
serializeFieldsFiltered(bean, jgen, provider);
} else {
serializeFields(bean, jgen, provider);
}
jgen.writeEndObject();
}
开发者ID:joyplus,项目名称:joyplus-tv,代码行数:35,代码来源:BeanSerializer.java
示例7: withObjectIdWriter
import com.fasterxml.jackson.databind.ser.impl.ObjectIdWriter; //导入依赖的package包/类
@Override
public BeanSerializerBase withObjectIdWriter(final ObjectIdWriter objectIdWriter) {
return new FlatteningModifySerializer(this, objectIdWriter);
}
开发者ID:joyent,项目名称:java-triton,代码行数:5,代码来源:FlatteningModifySerializer.java
示例8: BeanSerializerWrapper
import com.fasterxml.jackson.databind.ser.impl.ObjectIdWriter; //导入依赖的package包/类
protected BeanSerializerWrapper(BeanSerializerWrapper src, ObjectIdWriter objectIdWriter) {
super(src.serializer, objectIdWriter);
this.serializer = src;
}
开发者ID:openwide-java,项目名称:owsi-core-parent,代码行数:5,代码来源:HibernateBeanSerializerModifier.java
示例9: withObjectIdWriter
import com.fasterxml.jackson.databind.ser.impl.ObjectIdWriter; //导入依赖的package包/类
@Override
public BeanSerializerWrapper withObjectIdWriter(ObjectIdWriter objectIdWriter) {
return new BeanSerializerWrapper(this, objectIdWriter);
}
开发者ID:openwide-java,项目名称:owsi-core-parent,代码行数:5,代码来源:HibernateBeanSerializerModifier.java
示例10: DictionaryObjectSerializer
import com.fasterxml.jackson.databind.ser.impl.ObjectIdWriter; //导入依赖的package包/类
public DictionaryObjectSerializer(BeanSerializerBase src, ObjectIdWriter objectIdWriter) {
super(src, objectIdWriter);
}
开发者ID:jhendess,项目名称:metadict,代码行数:4,代码来源:DictionaryObjectSerializer.java
示例11: withObjectIdWriter
import com.fasterxml.jackson.databind.ser.impl.ObjectIdWriter; //导入依赖的package包/类
@Override
public BeanSerializerBase withObjectIdWriter(ObjectIdWriter objectIdWriter) {
return new DictionaryObjectSerializer(this, objectIdWriter);
}
开发者ID:jhendess,项目名称:metadict,代码行数:5,代码来源:DictionaryObjectSerializer.java
示例12: getObjectIdWriter
import com.fasterxml.jackson.databind.ser.impl.ObjectIdWriter; //导入依赖的package包/类
public ObjectIdWriter getObjectIdWriter()
{
return this._objectIdWriter;
}
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:5,代码来源:BeanSerializerBuilder.java
示例13: setObjectIdWriter
import com.fasterxml.jackson.databind.ser.impl.ObjectIdWriter; //导入依赖的package包/类
public void setObjectIdWriter(ObjectIdWriter paramObjectIdWriter)
{
this._objectIdWriter = paramObjectIdWriter;
}
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:5,代码来源:BeanSerializerBuilder.java
示例14: BeanSerializer
import com.fasterxml.jackson.databind.ser.impl.ObjectIdWriter; //导入依赖的package包/类
protected BeanSerializer(BeanSerializerBase paramBeanSerializerBase, ObjectIdWriter paramObjectIdWriter)
{
super(paramBeanSerializerBase, paramObjectIdWriter);
}
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:5,代码来源:BeanSerializer.java
示例15: withObjectIdWriter
import com.fasterxml.jackson.databind.ser.impl.ObjectIdWriter; //导入依赖的package包/类
public BeanSerializer withObjectIdWriter(ObjectIdWriter paramObjectIdWriter)
{
return new BeanSerializer(this, paramObjectIdWriter);
}
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:5,代码来源:BeanSerializer.java
示例16: JacksonHydraSerializer
import com.fasterxml.jackson.databind.ser.impl.ObjectIdWriter; //导入依赖的package包/类
public JacksonHydraSerializer(BeanSerializerBase source,
ObjectIdWriter objectIdWriter) {
super(source, objectIdWriter);
}
开发者ID:dschulten,项目名称:hydra-java,代码行数:5,代码来源:JacksonHydraSerializer.java
示例17: withObjectIdWriter
import com.fasterxml.jackson.databind.ser.impl.ObjectIdWriter; //导入依赖的package包/类
public BeanSerializerBase withObjectIdWriter(
ObjectIdWriter objectIdWriter) {
return new JacksonHydraSerializer(this, objectIdWriter);
}
开发者ID:dschulten,项目名称:hydra-java,代码行数:5,代码来源:JacksonHydraSerializer.java
示例18: ResourceDecoratorSerializer
import com.fasterxml.jackson.databind.ser.impl.ObjectIdWriter; //导入依赖的package包/类
protected ResourceDecoratorSerializer(BeanSerializerBase src, ObjectIdWriter objectIdWriter, ResourceContext resourceContext, ResourceDecorator<T> resourceDecorator) {
super(src, objectIdWriter);
this.resourceContext = resourceContext;
this.resourceDecorator = resourceDecorator;
}
开发者ID:nemerosa,项目名称:ontrack,代码行数:6,代码来源:ResourceDecoratorSerializer.java
示例19: ServiceSerializer
import com.fasterxml.jackson.databind.ser.impl.ObjectIdWriter; //导入依赖的package包/类
ServiceSerializer(BeanSerializerBase src, ObjectIdWriter objectIdWriter) {
super(src, objectIdWriter);
}
开发者ID:IDgis,项目名称:geo-publisher,代码行数:4,代码来源:JsonService.java
示例20: withObjectIdWriter
import com.fasterxml.jackson.databind.ser.impl.ObjectIdWriter; //导入依赖的package包/类
@Override
public BeanSerializerBase withObjectIdWriter(ObjectIdWriter objectIdWriter) {
return new ServiceSerializer(this, objectIdWriter);
}
开发者ID:IDgis,项目名称:geo-publisher,代码行数:5,代码来源:JsonService.java
注:本文中的com.fasterxml.jackson.databind.ser.impl.ObjectIdWriter类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论