public static class FieldType._Builder extends PMessageBuilder<FieldType,FieldType._Field> implements BinaryReader
Fields without key is assigned values ranging from 65335 and down (2^16-1) in order of appearance. Because of the "in order of appearance" the field *must* be filled by the IDL parser.
Consts are always given the key '0'.
| Constructor and Description |
|---|
_Builder()
Make a pmodel.FieldType builder instance.
|
_Builder(FieldType base)
Make a mutating builder off a base pmodel.FieldType.
|
| Modifier and Type | Method and Description |
|---|---|
FieldType._Builder |
addTo(int key,
Object value) |
FieldType |
build() |
FieldType._Builder |
clear(int key) |
FieldType._Builder |
clearAnnotations()
Clear the
annotations field. |
FieldType._Builder |
clearDefaultValue()
Clear the
default_value field. |
FieldType._Builder |
clearDocumentation()
Clear the
documentation field. |
FieldType._Builder |
clearEndPos()
Clear the
end_pos field. |
FieldType._Builder |
clearId()
Clear the
id field. |
FieldType._Builder |
clearName()
Clear the
name field. |
FieldType._Builder |
clearRequirement()
Clear the
requirement field. |
FieldType._Builder |
clearStartPos()
Clear the
start_pos field. |
FieldType._Builder |
clearType()
Clear the
type field. |
FieldType._Builder |
clearValueStartPos()
Clear the
value_start_pos field. |
PStructDescriptor<FieldType,FieldType._Field> |
descriptor() |
boolean |
equals(Object o) |
String |
getDefaultValue() |
String |
getDocumentation() |
FilePos |
getEndPos()
The end of the definition
|
int |
getId() |
String |
getName() |
FieldRequirement |
getRequirement() |
FilePos |
getStartPos()
The start of the definition (position of field ID)
|
String |
getType() |
FilePos |
getValueStartPos()
Note the start of the default value in the parsed thrift file, this can be used
for making more accurate exception / parse data from the const parser.
|
int |
hashCode() |
boolean |
isModified(int key) |
boolean |
isModifiedAnnotations()
Checks if the
annotations field has been modified since the
builder was created. |
boolean |
isModifiedDefaultValue()
Checks if the
default_value field has been modified since the
builder was created. |
boolean |
isModifiedDocumentation()
Checks if the
documentation field has been modified since the
builder was created. |
boolean |
isModifiedEndPos()
Checks if the
end_pos field has been modified since the
builder was created. |
boolean |
isModifiedId()
Checks if the
id field has been modified since the
builder was created. |
boolean |
isModifiedName()
Checks if the
name field has been modified since the
builder was created. |
boolean |
isModifiedRequirement()
Checks if the
requirement field has been modified since the
builder was created. |
boolean |
isModifiedStartPos()
Checks if the
start_pos field has been modified since the
builder was created. |
boolean |
isModifiedType()
Checks if the
type field has been modified since the
builder was created. |
boolean |
isModifiedValueStartPos()
Checks if the
value_start_pos field has been modified since the
builder was created. |
boolean |
isSet(int key) |
boolean |
isSetAnnotations()
Checks for presence of the
annotations field. |
boolean |
isSetDefaultValue()
Checks for presence of the
default_value field. |
boolean |
isSetDocumentation()
Checks for presence of the
documentation field. |
boolean |
isSetEndPos()
Checks for presence of the
end_pos field. |
boolean |
isSetId()
Checks for presence of the
id field. |
boolean |
isSetName()
Checks for presence of the
name field. |
boolean |
isSetRequirement()
Checks for presence of the
requirement field. |
boolean |
isSetStartPos()
Checks for presence of the
start_pos field. |
boolean |
isSetType()
Checks for presence of the
type field. |
boolean |
isSetValueStartPos()
Checks for presence of the
value_start_pos field. |
FieldType._Builder |
merge(FieldType from) |
Map<String,String> |
mutableAnnotations()
Get the builder for the contained
annotations message field. |
FilePos._Builder |
mutableEndPos()
Get the builder for the contained
end_pos message field. |
FilePos._Builder |
mutableStartPos()
Get the builder for the contained
start_pos message field. |
FilePos._Builder |
mutableValueStartPos()
Get the builder for the contained
value_start_pos message field. |
PMessageBuilder |
mutator(int key) |
FieldType._Builder |
putInAnnotations(String key,
String value)
Adds a mapping to the
annotations map. |
void |
readBinary(net.morimekta.util.io.BigEndianBinaryReader reader,
boolean strict) |
FieldType._Builder |
set(int key,
Object value) |
FieldType._Builder |
setAnnotations(Map<String,String> value)
Set the
annotations field value. |
FieldType._Builder |
setDefaultValue(String value)
Set the
default_value field value. |
FieldType._Builder |
setDocumentation(String value)
Set the
documentation field value. |
FieldType._Builder |
setEndPos(FilePos._Builder builder)
Set the
end_pos field value. |
FieldType._Builder |
setEndPos(FilePos value)
Set the
end_pos field value. |
FieldType._Builder |
setId(int value)
Set the
id field value. |
FieldType._Builder |
setName(String value)
Set the
name field value. |
FieldType._Builder |
setRequirement(FieldRequirement value)
Set the
requirement field value. |
FieldType._Builder |
setStartPos(FilePos._Builder builder)
Set the
start_pos field value. |
FieldType._Builder |
setStartPos(FilePos value)
Set the
start_pos field value. |
FieldType._Builder |
setType(String value)
Set the
type field value. |
FieldType._Builder |
setValueStartPos(FilePos._Builder builder)
Set the
value_start_pos field value. |
FieldType._Builder |
setValueStartPos(FilePos value)
Set the
value_start_pos field value. |
boolean |
valid() |
void |
validate() |
addTo, clear, isModified, isSet, modifiedFields, mutator, presentFields, setpublic _Builder()
public _Builder(FieldType base)
base - The base FieldType@Nonnull public FieldType._Builder merge(FieldType from)
merge in class PMessageBuilder<FieldType,FieldType._Field>@Nonnull public FieldType._Builder setDocumentation(String value)
documentation field value.value - The new valuepublic boolean isSetDocumentation()
documentation field.public boolean isModifiedDocumentation()
documentation field has been modified since the
builder was created.@Nonnull public FieldType._Builder clearDocumentation()
documentation field.public String getDocumentation()
documentation field value@Nonnull public FieldType._Builder setId(int value)
id field value.value - The new valuepublic boolean isSetId()
id field.public boolean isModifiedId()
id field has been modified since the
builder was created.@Nonnull public FieldType._Builder clearId()
id field.public int getId()
id field value@Nonnull public FieldType._Builder setRequirement(FieldRequirement value)
requirement field value.value - The new valuepublic boolean isSetRequirement()
requirement field.public boolean isModifiedRequirement()
requirement field has been modified since the
builder was created.@Nonnull public FieldType._Builder clearRequirement()
requirement field.public FieldRequirement getRequirement()
requirement field value@Nonnull public FieldType._Builder setType(String value)
type field value.value - The new valuepublic boolean isSetType()
type field.public boolean isModifiedType()
type field has been modified since the
builder was created.@Nonnull public FieldType._Builder clearType()
type field.public String getType()
type field value@Nonnull public FieldType._Builder setName(String value)
name field value.value - The new valuepublic boolean isSetName()
name field.public boolean isModifiedName()
name field has been modified since the
builder was created.@Nonnull public FieldType._Builder clearName()
name field.public String getName()
name field value@Nonnull public FieldType._Builder setDefaultValue(String value)
default_value field value.value - The new valuepublic boolean isSetDefaultValue()
default_value field.public boolean isModifiedDefaultValue()
default_value field has been modified since the
builder was created.@Nonnull public FieldType._Builder clearDefaultValue()
default_value field.public String getDefaultValue()
default_value field value@Nonnull public FieldType._Builder setAnnotations(Map<String,String> value)
annotations field value.value - The new value@Nonnull public FieldType._Builder putInAnnotations(String key, String value)
annotations map.key - The inserted keyvalue - The inserted valuepublic boolean isSetAnnotations()
annotations field.public boolean isModifiedAnnotations()
annotations field has been modified since the
builder was created.@Nonnull public FieldType._Builder clearAnnotations()
annotations field.@Nonnull public Map<String,String> mutableAnnotations()
annotations message field.@Nonnull public FieldType._Builder setValueStartPos(FilePos value)
value_start_pos field value.
Note the start of the default value in the parsed thrift file, this can be used for making more accurate exception / parse data from the const parser.
value - The new value@Nonnull public FieldType._Builder setValueStartPos(FilePos._Builder builder)
value_start_pos field value.
Note the start of the default value in the parsed thrift file, this can be used for making more accurate exception / parse data from the const parser.
builder - builder for the new valuepublic boolean isSetValueStartPos()
value_start_pos field.public boolean isModifiedValueStartPos()
value_start_pos field has been modified since the
builder was created.@Nonnull public FieldType._Builder clearValueStartPos()
value_start_pos field.@Nonnull public FilePos._Builder mutableValueStartPos()
value_start_pos message field.
Note the start of the default value in the parsed thrift file, this can be used for making more accurate exception / parse data from the const parser.
public FilePos getValueStartPos()
@Nonnull public FieldType._Builder setStartPos(FilePos value)
start_pos field value.
The start of the definition (position of field ID)
value - The new value@Nonnull public FieldType._Builder setStartPos(FilePos._Builder builder)
start_pos field value.
The start of the definition (position of field ID)
builder - builder for the new valuepublic boolean isSetStartPos()
start_pos field.public boolean isModifiedStartPos()
start_pos field has been modified since the
builder was created.@Nonnull public FieldType._Builder clearStartPos()
start_pos field.@Nonnull public FilePos._Builder mutableStartPos()
start_pos message field.
The start of the definition (position of field ID)
public FilePos getStartPos()
@Nonnull public FieldType._Builder setEndPos(FilePos value)
end_pos field value.
The end of the definition
value - The new value@Nonnull public FieldType._Builder setEndPos(FilePos._Builder builder)
end_pos field value.
The end of the definition
builder - builder for the new valuepublic boolean isSetEndPos()
end_pos field.public boolean isModifiedEndPos()
end_pos field has been modified since the
builder was created.@Nonnull public FieldType._Builder clearEndPos()
end_pos field.@Nonnull public FilePos._Builder mutableEndPos()
end_pos message field.
The end of the definition
public FilePos getEndPos()
public PMessageBuilder mutator(int key)
mutator in class PMessageBuilder<FieldType,FieldType._Field>@Nonnull public FieldType._Builder set(int key, Object value)
set in class PMessageBuilder<FieldType,FieldType._Field>public boolean isSet(int key)
isSet in class PMessageBuilder<FieldType,FieldType._Field>public boolean isModified(int key)
isModified in class PMessageBuilder<FieldType,FieldType._Field>public FieldType._Builder addTo(int key, Object value)
addTo in class PMessageBuilder<FieldType,FieldType._Field>@Nonnull public FieldType._Builder clear(int key)
clear in class PMessageBuilder<FieldType,FieldType._Field>public boolean valid()
valid in class PMessageBuilder<FieldType,FieldType._Field>public void validate()
validate in class PMessageBuilder<FieldType,FieldType._Field>@Nonnull public PStructDescriptor<FieldType,FieldType._Field> descriptor()
descriptor in class PMessageBuilder<FieldType,FieldType._Field>public void readBinary(net.morimekta.util.io.BigEndianBinaryReader reader,
boolean strict)
throws IOException
readBinary in interface BinaryReaderIOExceptionCopyright © 2015–2018 morimekta.net. All rights reserved.