public abstract class Field<T> extends Object
| Modifier and Type | Field and Description |
|---|---|
int |
groupFilter |
String |
name |
int |
number |
boolean |
repeated |
WireFormat.FieldType |
type |
| Constructor and Description |
|---|
Field(WireFormat.FieldType type,
int number,
String name,
boolean repeated,
Tag tag) |
Field(WireFormat.FieldType type,
int number,
String name,
Tag tag) |
| Modifier and Type | Method and Description |
|---|---|
protected Field<T> |
copy(IdStrategy strategy)
No copy by default.
|
protected abstract void |
mergeFrom(Input input,
T message)
Reads the field value into the
message. |
protected abstract void |
transfer(Pipe pipe,
Input input,
Output output,
boolean repeated)
Transfer the input field to the output field.
|
protected abstract void |
writeTo(Output output,
T message)
Writes the value of a field to the
output. |
public final WireFormat.FieldType type
public final int number
public final String name
public final boolean repeated
public final int groupFilter
public Field(WireFormat.FieldType type, int number, String name, boolean repeated, Tag tag)
public Field(WireFormat.FieldType type, int number, String name, Tag tag)
protected Field<T> copy(IdStrategy strategy)
protected abstract void writeTo(Output output, T message) throws IOException
output.IOExceptionprotected abstract void mergeFrom(Input input, T message) throws IOException
message.IOExceptionprotected abstract void transfer(Pipe pipe, Input input, Output output, boolean repeated) throws IOException
IOExceptionCopyright © 2009–2020. All rights reserved.