本文整理了Java中io.protostuff.Input.handleUnknownField()
方法的一些代码示例,展示了Input.handleUnknownField()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Input.handleUnknownField()
方法的具体详情如下:
包路径:io.protostuff.Input
类名称:Input
方法名:handleUnknownField
[英]The underlying implementation should handle the unknown field.
[中]底层实现应该处理未知字段。
代码示例来源:origin: protostuff/protostuff
public void mergeFrom(Input input, A message) throws IOException
{
for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
{
switch(number)
{
case 0:
return;
case 1:
message.value = input.readInt32();
break;
default:
input.handleUnknownField(number, this);
}
}
}
代码示例来源: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
public void mergeFrom(Input input, SampleClass message) throws IOException
{
for (int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
{
switch (number)
{
case 0:
return;
case 1:
if (message.testString == null)
message.testString = new ArrayList<String>();
message.testString.add(input.readString());
break;
default:
input.handleUnknownField(number, this);
}
}
}
代码示例来源:origin: protostuff/protostuff
for (int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
if (message.someInt32 == null)
message.someInt32 = new ArrayList<Integer>();
message.someInt32.add(input.readInt32());
break;
case 2:
if (message.someFixed64 == null)
message.someFixed64 = new ArrayList<Long>();
message.someFixed64.add(input.readFixed64());
break;
default:
input.handleUnknownField(number, this);
代码示例来源:origin: protostuff/protostuff
@Override
public void mergeFrom(Input input, RequiresName 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.description = input.readString();
break;
default:
input.handleUnknownField(number, this);
}
}
}
代码示例来源:origin: dremio/dremio-oss
public void mergeFrom(Input input, FragmentPriority message) throws IOException
{
for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
{
switch(number)
{
case 0:
return;
case 1:
message.workloadClass = WorkloadClass.valueOf(input.readEnum());
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
@Override
public void mergeFrom(Input input, HasHasBar 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.hasBar = readHasBar(input);
break;
default:
input.handleUnknownField(number, this);
}
}
}
代码示例来源:origin: protostuff/protostuff
public void mergeFrom(Input input, GeneratedInt1 message) throws IOException
{
for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
{
switch(number)
{
case 0:
return;
case 1:
message.a0 = input.readInt32();
break;
default:
input.handleUnknownField(number, this);
}
}
}
代码示例来源: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: dremio/dremio-oss
public void mergeFrom(Input input, FilterByType message) throws IOException
{
for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
{
switch(number)
{
case 0:
return;
case 1:
message.type = DataType.valueOf(input.readEnum())
;
break;
default:
input.handleUnknownField(number, this);
}
}
}
代码示例来源: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
@Override
public void mergeFrom(Input input, Baz message) throws IOException
{
for (int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
{
switch (number)
{
case 0:
return;
case 1:
message.id = input.readInt32();
break;
case 2:
message.name = input.readString();
break;
case 3:
message.timestamp = input.readInt64();
break;
default:
input.handleUnknownField(number, this);
}
}
}
代码示例来源:origin: protostuff/protostuff
@Override
protected void transfer(Pipe pipe, Input input, Output output)
throws IOException
{
for (int number = input.readFieldNumber(wrappedSchema); number != 0; number = input
.readFieldNumber(wrappedSchema))
{
final Field<T> field = fieldsMap.getFieldByNumber(number);
if (field == null)
input.handleUnknownField(number, wrappedSchema);
else
field.transfer(pipe, input, output, field.repeated);
}
}
}
代码示例来源: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: dremio/dremio-oss
public void mergeFrom(Input input, FieldTrim message) throws IOException
{
for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
{
switch(number)
{
case 0:
return;
case 1:
message.trimType = TrimType.valueOf(input.readEnum())
;
break;
default:
input.handleUnknownField(number, this);
}
}
}
代码示例来源: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: dremio/dremio-oss
public void mergeFrom(Input input, ExpCalculatedField message) throws IOException
{
for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
{
switch(number)
{
case 0:
return;
case 1:
message.exp = input.readString();
break;
default:
input.handleUnknownField(number, this);
}
}
}
代码示例来源:origin: protostuff/protostuff
@Override
protected void transfer(Pipe pipe, Input input, Output output)
throws IOException
{
for (int number = input.readFieldNumber(wrappedSchema); number != 0; number = input
.readFieldNumber(wrappedSchema))
{
final Field<T> field = fieldsMap.getFieldByNumber(number);
if (field == null)
input.handleUnknownField(number, wrappedSchema);
else
field.transfer(pipe, input, output, field.repeated);
}
}
}
代码示例来源:origin: dremio/dremio-oss
public void mergeFrom(Input input, TransformCreateFromParent message) throws IOException
{
for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
{
switch(number)
{
case 0:
return;
case 1:
message.createFrom = input.mergeObject(message.createFrom, From.getSchema())
;
break;
default:
input.handleUnknownField(number, this);
}
}
}
内容来源于网络,如有侵权,请联系作者删除!