本文整理了Java中io.protostuff.Input.mergeObject()
方法的一些代码示例,展示了Input.mergeObject()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Input.mergeObject()
方法的具体详情如下:
包路径:io.protostuff.Input
类名称:Input
方法名:mergeObject
[英]Merges an object(with schema) field value. The provided Schema handles the deserialization for the object.
[中]合并对象(与架构)字段值。提供的模式处理对象的反序列化。
代码示例来源:origin: protostuff/protostuff
for (int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
if (entry != input.mergeObject(entry, entrySchema))
代码示例来源:origin: protostuff/protostuff
@Override
public void mergeFrom(Input input, WrapperPojo message) throws IOException
{
for (int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
{
switch (number)
{
case 0:
return;
case 1:
message.requiresName = input.mergeObject(message.requiresName, RequiresName.SCHEMA);
break;
default:
input.handleUnknownField(number, this);
}
}
}
代码示例来源:origin: protostuff/protostuff
@Override
public void mergeFrom(Input input, Student message) throws IOException
{
for (int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
{
switch (number)
{
case 0:
return;
case 1:
message.name = input.readString();
break;
case 2:
if (message.club == null)
message.club = new ArrayList<Club>();
message.club.add(input.mergeObject(null, Club.getSchema()));
break;
default:
input.handleUnknownField(number, this);
}
}
}
代码示例来源:origin: protostuff/protostuff
Object c = input.mergeObject(wrapper,
strategy.POLYMORPHIC_COLLECTION_SCHEMA);
if (!graph || !((GraphInput) input).isCurrentMessageReference())
c = wrapper.value;
if (1 != input.readFieldNumber(schema))
throw new ProtostuffException("Corrupt input.");
Object type = input.mergeObject(wrapper, strategy.CLASS_SCHEMA);
if (!graph || !((GraphInput) input).isCurrentMessageReference())
type = wrapper.value;
代码示例来源:origin: protostuff/protostuff
@Override
public void mergeFrom(Input input, ClubFounder message) throws IOException
{
for (int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
{
switch (number)
{
case 0:
return;
case 1:
message.name = input.readString();
break;
case 2:
message.club = input.mergeObject(message.club, Club.getSchema());
break;
default:
input.handleUnknownField(number, this);
}
}
}
代码示例来源:origin: protostuff/protostuff
Object c = input.mergeObject(wrapper,
strategy.POLYMORPHIC_COLLECTION_SCHEMA);
if (!graph || !((GraphInput) input).isCurrentMessageReference())
c = wrapper.value;
if (1 != input.readFieldNumber(schema))
throw new ProtostuffException("Corrupt input.");
Object type = input.mergeObject(wrapper, strategy.CLASS_SCHEMA);
if (!graph || !((GraphInput) input).isCurrentMessageReference())
type = wrapper.value;
代码示例来源:origin: protostuff/protostuff
@Override
public void mergeFrom(Input input, Club message) throws IOException
{
for (int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
{
switch (number)
{
case 0:
return;
case 1:
message.name = input.readString();
break;
case 2:
if (message.student == null)
message.student = new ArrayList<Student>();
message.student.add(input.mergeObject(null, Student.getSchema()));
break;
case 3:
if (message.partnerClub == null)
message.partnerClub = new ArrayList<Club>();
message.partnerClub.add(input.mergeObject(null, Club.getSchema()));
break;
default:
input.handleUnknownField(number, this);
}
}
}
代码示例来源:origin: protostuff/protostuff
Object m = input.mergeObject(wrapper, strategy.POLYMORPHIC_MAP_SCHEMA);
if (!graph || !((GraphInput) input).isCurrentMessageReference())
m = wrapper.value;
if (1 != input.readFieldNumber(schema))
throw new ProtostuffException("Corrupt input.");
Object keyType = input.mergeObject(wrapper, strategy.CLASS_SCHEMA);
if (!graph || !((GraphInput) input).isCurrentMessageReference())
keyType = wrapper.value;
if (2 != input.readFieldNumber(schema))
throw new ProtostuffException("Corrupt input.");
Object valueType = input.mergeObject(wrapper, strategy.CLASS_SCHEMA);
if (!graph || !((GraphInput) input).isCurrentMessageReference())
valueType = wrapper.value;
代码示例来源:origin: protostuff/protostuff
@Override
public void mergeFrom(Input input, Foo message) throws IOException
for (int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
if (message.someBar == null)
message.someBar = new ArrayList<Bar>();
message.someBar.add(input.mergeObject(null, Bar.getSchema()));
break;
case 4:
break;
default:
input.handleUnknownField(number, this);
代码示例来源:origin: protostuff/protostuff
Object m = input.mergeObject(wrapper, strategy.POLYMORPHIC_MAP_SCHEMA);
if (!graph || !((GraphInput) input).isCurrentMessageReference())
m = wrapper.value;
if (1 != input.readFieldNumber(schema))
throw new ProtostuffException("Corrupt input.");
Object keyType = input.mergeObject(wrapper, strategy.CLASS_SCHEMA);
if (!graph || !((GraphInput) input).isCurrentMessageReference())
keyType = wrapper.value;
if (2 != input.readFieldNumber(schema))
throw new ProtostuffException("Corrupt input.");
Object valueType = input.mergeObject(wrapper, strategy.CLASS_SCHEMA);
if (!graph || !((GraphInput) input).isCurrentMessageReference())
valueType = wrapper.value;
代码示例来源:origin: protostuff/protostuff
@Override
public void mergeFrom(Input input, Bar message) throws IOException
for (int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
break;
case 3:
message.someBaz = input.mergeObject(message.someBaz, Baz.getSchema());
break;
case 4:
break;
default:
input.handleUnknownField(number, this);
代码示例来源:origin: protostuff/protostuff
throws IOException
switch (input.readFieldNumber(schema))
Object v = input.mergeObject(wrapper, strategy.OBJECT_SCHEMA);
if (!graph || !((GraphInput) input).isCurrentMessageReference())
v = wrapper.value;
if (0 != input.readFieldNumber(schema))
throw new ProtostuffException("Corrupt input.");
Object k = input.mergeObject(wrapper, strategy.OBJECT_SCHEMA);
if (!graph || !((GraphInput) input).isCurrentMessageReference())
k = wrapper.value;
switch (input.readFieldNumber(schema))
Object v = input.mergeObject(wrapper, strategy.OBJECT_SCHEMA);
if (!graph || !((GraphInput) input).isCurrentMessageReference())
v = wrapper.value;
代码示例来源:origin: NationalSecurityAgency/datawave
@Override
public void mergeFrom(Input input, IndexStatsResponse other) throws IOException {
int number;
while ((number = input.readFieldNumber(this)) != 0) {
switch (number) {
case 1:
other.fieldStats.add(input.mergeObject(null, FieldStat.SCHEMA));
default:
input.handleUnknownField(number, SCHEMA);
}
}
}
代码示例来源:origin: protostuff/protostuff
throws IOException
switch (input.readFieldNumber(schema))
Object v = input.mergeObject(wrapper, strategy.OBJECT_SCHEMA);
if (!graph || !((GraphInput) input).isCurrentMessageReference())
v = wrapper.value;
if (0 != input.readFieldNumber(schema))
throw new ProtostuffException("Corrupt input.");
Object k = input.mergeObject(wrapper, strategy.OBJECT_SCHEMA);
if (!graph || !((GraphInput) input).isCurrentMessageReference())
k = wrapper.value;
switch (input.readFieldNumber(schema))
Object v = input.mergeObject(wrapper, strategy.OBJECT_SCHEMA);
if (!graph || !((GraphInput) input).isCurrentMessageReference())
v = wrapper.value;
代码示例来源:origin: dremio/dremio-oss
public void mergeFrom(Input input, GetCatalogsReq message) throws IOException
{
for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
{
switch(number)
{
case 0:
return;
case 1:
message.catalogNameFilter = input.mergeObject(message.catalogNameFilter, LikeFilter.getSchema());
break;
default:
input.handleUnknownField(number, this);
}
}
}
代码示例来源:origin: protostuff/protostuff
@Override
public Object readFrom(Input input, Object owner) throws IOException
{
if (ID_ARRAY_LEN != input.readFieldNumber(this))
throw new ProtostuffException("Corrupt input.");
final int len = input.readInt32();
Object[] array = (Object[])Array.newInstance(hs.getSchema().typeClass(), len);
if (input instanceof GraphInput)
{
// update the actual reference.
((GraphInput) input).updateLast(array, owner);
}
for (int i = 0; i < len;)
{
switch (input.readFieldNumber(this))
{
case ID_ARRAY_DATA:
array[i++] = input.mergeObject(null, hs.getSchema());
break;
case ID_ARRAY_NULLCOUNT:
i += input.readUInt32();
break;
default:
throw new ProtostuffException("Corrupt input.");
}
}
if (0 != input.readFieldNumber(this))
throw new ProtostuffException("Corrupt input.");
return array;
}
代码示例来源:origin: dremio/dremio-oss
public void mergeFrom(Input input, FilterPattern message) throws IOException
{
for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
{
switch(number)
{
case 0:
return;
case 1:
message.rule = input.mergeObject(message.rule, ReplacePatternRule.getSchema())
;
break;
default:
input.handleUnknownField(number, this);
}
}
}
代码示例来源:origin: protostuff/protostuff
@Override
public Object readFrom(Input input, Object owner) throws IOException
{
if (ID_ARRAY_LEN != input.readFieldNumber(this))
throw new ProtostuffException("Corrupt input.");
final int len = input.readInt32();
Object[] array = (Object[])Array.newInstance(hs.getSchema().typeClass(), len);
if (input instanceof GraphInput)
{
// update the actual reference.
((GraphInput) input).updateLast(array, owner);
}
for (int i = 0; i < len;)
{
switch (input.readFieldNumber(this))
{
case ID_ARRAY_DATA:
array[i++] = input.mergeObject(null, hs.getSchema());
break;
case ID_ARRAY_NULLCOUNT:
i += input.readUInt32();
break;
default:
throw new ProtostuffException("Corrupt input.");
}
}
if (0 != input.readFieldNumber(this))
throw new ProtostuffException("Corrupt input.");
return array;
}
代码示例来源:origin: dremio/dremio-oss
public void mergeFrom(Input input, FieldExtract message) throws IOException
{
for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
{
switch(number)
{
case 0:
return;
case 1:
message.rule = input.mergeObject(message.rule, ExtractRule.getSchema())
;
break;
default:
input.handleUnknownField(number, this);
}
}
}
代码示例来源:origin: protostuff/protostuff
final int next = input.readFieldNumber(schema);
if (next == 0)
Object element = input.mergeObject(wrapper, strategy.OBJECT_SCHEMA);
if (!graph || !((GraphInput) input).isCurrentMessageReference())
element = wrapper.value;
final int next = input.readFieldNumber(schema);
if (next == 0)
Object element = input.mergeObject(wrapper, strategy.OBJECT_SCHEMA);
if (!graph || !((GraphInput) input).isCurrentMessageReference())
element = wrapper.value;
Object m = input.mergeObject(wrapper,
strategy.POLYMORPHIC_MAP_SCHEMA);
if (!graph || !((GraphInput) input).isCurrentMessageReference())
if (1 != input.readFieldNumber(schema))
throw new ProtostuffException("Corrupt input.");
Object element = input.mergeObject(wrapper, strategy.OBJECT_SCHEMA);
if (!graph || !((GraphInput) input).isCurrentMessageReference())
element = wrapper.value;
内容来源于网络,如有侵权,请联系作者删除!