@Target(value={FIELD,METHOD}) @Retention(value=RUNTIME) @Documented public @interface ProtoField
ProtoField
in order to be considered a Protocol Buffers message type.Modifier and Type | Required Element and Description |
---|---|
int |
number
The Protocol Buffers tag number.
|
Modifier and Type | Optional Element and Description |
---|---|
Class<? extends Collection> |
collectionImplementation
The actual concrete and instantiable implementation type of the Collection.
|
String |
defaultValue
The default value to assign to this field if it is found missing in the Protobuf data stream during
reading.
|
Class<?> |
javaType
The actual concrete and instantiable Java type.
|
String |
name
The name of the field.
|
boolean |
required
Marks the field as required.
|
Type |
type
The Protobuf type of the field.
|
public abstract Type type
public abstract boolean required
public abstract String name
public abstract String defaultValue
The value is given in the form of a string that must obey correct syntax (as defined by Protobuf spec.) in order to be parsed into the actual value which may be of a different type than string.
This value has no significance during writing of a null
field, ie. it does not get written into the data
stream as a substitute for the missing value. It is expected that the reader of this Protobuf stream will do that
when reading it back.
public abstract Class<?> javaType
public abstract Class<? extends Collection> collectionImplementation
Copyright © 2019 JBoss, a division of Red Hat. All rights reserved.