public static class MessageType._Builder extends net.morimekta.providence.PMessageBuilder<MessageType> implements Decl._Builder, MessageType_OrBuilder, net.morimekta.providence.serializer.binary.BinaryReader
Decl._Builder, Decl._FieldkDescriptor| Constructor and Description |
|---|
_Builder()
Make a p_model.MessageType builder instance.
|
_Builder(MessageType base)
Make a mutating builder off a base p_model.MessageType.
|
| Modifier and Type | Method and Description |
|---|---|
MessageType._Builder |
addTo(int key,
Object value) |
MessageType._Builder |
addToFields(FieldType... values)
Adds entries to the
fields list. |
MessageType |
build() |
MessageType._Builder |
clear(int key) |
MessageType._Builder |
clearAnnotations()
Clear the
annotations field. |
MessageType._Builder |
clearDocumentation()
Clear the
documentation field. |
MessageType._Builder |
clearFields()
Clear the
fields field. |
MessageType._Builder |
clearImplementing()
Clear the
implementing field. |
MessageType._Builder |
clearName()
Clear the
name field. |
MessageType._Builder |
clearVariant()
Clear the
variant field. |
net.morimekta.providence.descriptor.PStructDescriptor<MessageType> |
descriptor() |
boolean |
equals(Object o) |
<T> T |
get(int key) |
Map<String,String> |
getAnnotations() |
String |
getDocumentation()
Documentation for the specific declaration.
|
List<FieldType> |
getFields() |
String |
getImplementing()
Interface this message is implementing.
|
String |
getName()
Name of the type, constant or service.
|
MessageVariant |
getVariant() |
boolean |
has(int key) |
boolean |
hasAnnotations()
Checks for presence of the
annotations field. |
boolean |
hasDocumentation()
Checks for presence of the
documentation field. |
boolean |
hasFields()
Checks for presence of the
fields field. |
int |
hashCode() |
boolean |
hasImplementing()
Checks for presence of the
implementing field. |
boolean |
hasName()
Checks for presence of the
name field. |
boolean |
hasVariant()
Checks for presence of the
variant field. |
boolean |
isModified(int key) |
boolean |
isModifiedAnnotations()
Checks if the
annotations 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 |
isModifiedFields()
Checks if the
fields field has been modified since the
builder was created. |
boolean |
isModifiedImplementing()
Checks if the
implementing 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 |
isModifiedVariant()
Checks if the
variant field has been modified since the
builder was created. |
boolean |
isSet(int key) |
boolean |
isSetAnnotations()
Checks for explicit presence of the
annotations field. |
boolean |
isSetDocumentation()
Checks for explicit presence of the
documentation field. |
boolean |
isSetFields()
Checks for explicit presence of the
fields field. |
boolean |
isSetImplementing()
Checks for explicit presence of the
implementing field. |
boolean |
isSetName()
Checks for explicit presence of the
name field. |
boolean |
isSetVariant()
Checks for explicit presence of the
variant field. |
MessageType._Builder |
merge(MessageType from) |
Map<String,String> |
mutableAnnotations() |
List<FieldType> |
mutableFields() |
net.morimekta.providence.PMessageBuilder |
mutator(int key) |
int |
numAnnotations() |
int |
numFields() |
Optional<Map<String,String>> |
optionalAnnotations() |
Optional<String> |
optionalDocumentation()
Documentation for the specific declaration.
|
Optional<String> |
optionalImplementing()
Interface this message is implementing.
|
Optional<MessageVariant> |
optionalVariant() |
MessageType._Builder |
putInAnnotations(String key,
String value)
Adds a mapping to the
annotations map. |
void |
readBinary(net.morimekta.util.io.BigEndianBinaryReader reader,
boolean strict) |
MessageType._Builder |
set(int key,
Object value) |
MessageType._Builder |
setAnnotations(Map<String,String> value)
Set the
annotations field value. |
MessageType._Builder |
setDocumentation(String value)
Set the
documentation field value. |
MessageType._Builder |
setFields(Collection<FieldType> value)
Set the
fields field value. |
MessageType._Builder |
setImplementing(String value)
Set the
implementing field value. |
MessageType._Builder |
setName(String value)
Set the
name field value. |
MessageType._Builder |
setVariant(MessageVariant value)
Set the
variant field value. |
boolean |
valid() |
MessageType._Builder |
validate() |
addTo, clear, isModified, isSet, modifiedFieldNames, modifiedFields, mutator, presentFieldNames, presentFields, setpublic _Builder()
public _Builder(MessageType base)
base - The base MessageType@Nonnull public MessageType._Builder merge(MessageType from)
merge in class net.morimekta.providence.PMessageBuilder<MessageType>@Nonnull public MessageType._Builder setDocumentation(String value)
documentation field value.setDocumentation in interface Decl._Buildervalue - The new valuepublic boolean isSetDocumentation()
documentation field.public boolean hasDocumentation()
documentation field.hasDocumentation in interface Declpublic boolean isModifiedDocumentation()
documentation field has been modified since the
builder was created.@Nonnull public MessageType._Builder clearDocumentation()
documentation field.clearDocumentation in interface Decl._Builderpublic String getDocumentation()
DeclgetDocumentation in interface Decldocumentation field value@Nonnull public Optional<String> optionalDocumentation()
DecloptionalDocumentation in interface Decldocumentation field value@Nonnull public MessageType._Builder setVariant(MessageVariant value)
variant field value.value - The new valuepublic boolean isSetVariant()
variant field.public boolean hasVariant()
variant field.hasVariant in interface MessageType_OrBuilderpublic boolean isModifiedVariant()
variant field has been modified since the
builder was created.@Nonnull public MessageType._Builder clearVariant()
variant field.public MessageVariant getVariant()
getVariant in interface MessageType_OrBuildervariant field value@Nonnull public Optional<MessageVariant> optionalVariant()
optionalVariant in interface MessageType_OrBuildervariant field value@Nonnull public MessageType._Builder setName(String value)
name field value.setName in interface Decl._Buildervalue - The new valuepublic boolean isSetName()
name field.public boolean hasName()
name field.public boolean isModifiedName()
name field has been modified since the
builder was created.@Nonnull public MessageType._Builder clearName()
name field.clearName in interface Decl._Builderpublic String getName()
Decl@Nonnull public MessageType._Builder setFields(Collection<FieldType> value)
fields field value.value - The new value@Nonnull public MessageType._Builder addToFields(FieldType... values)
fields list.values - The added valuepublic boolean isSetFields()
fields field.public boolean hasFields()
fields field.hasFields in interface MessageType_OrBuilderpublic boolean isModifiedFields()
fields field has been modified since the
builder was created.@Nonnull public MessageType._Builder clearFields()
fields field.public List<FieldType> getFields()
getFields in interface MessageType_OrBuilderfields field valuepublic int numFields()
numFields in interface MessageType_OrBuilderfields.@Nonnull public MessageType._Builder setAnnotations(Map<String,String> value)
annotations field value.value - The new value@Nonnull public MessageType._Builder putInAnnotations(String key, String value)
annotations map.key - The inserted keyvalue - The inserted valuepublic boolean isSetAnnotations()
annotations field.public boolean hasAnnotations()
annotations field.hasAnnotations in interface MessageType_OrBuilderpublic boolean isModifiedAnnotations()
annotations field has been modified since the
builder was created.@Nonnull public MessageType._Builder clearAnnotations()
annotations field.public Map<String,String> mutableAnnotations()
annotations containerpublic Map<String,String> getAnnotations()
getAnnotations in interface MessageType_OrBuilderannotations field value@Nonnull public Optional<Map<String,String>> optionalAnnotations()
optionalAnnotations in interface MessageType_OrBuilderannotations field valuepublic int numAnnotations()
numAnnotations in interface MessageType_OrBuilderannotations.@Nonnull public MessageType._Builder setImplementing(String value)
implementing field value.
Interface this message is implementing.
value - The new valuepublic boolean isSetImplementing()
implementing field.public boolean hasImplementing()
implementing field.hasImplementing in interface MessageType_OrBuilderpublic boolean isModifiedImplementing()
implementing field has been modified since the
builder was created.@Nonnull public MessageType._Builder clearImplementing()
implementing field.public String getImplementing()
getImplementing in interface MessageType_OrBuilderimplementing field value@Nonnull public Optional<String> optionalImplementing()
optionalImplementing in interface MessageType_OrBuilderimplementing field valuepublic net.morimekta.providence.PMessageBuilder mutator(int key)
mutator in class net.morimekta.providence.PMessageBuilder<MessageType>@Nonnull public MessageType._Builder set(int key, Object value)
set in class net.morimekta.providence.PMessageBuilder<MessageType>public boolean isSet(int key)
isSet in class net.morimekta.providence.PMessageBuilder<MessageType>public boolean isModified(int key)
isModified in class net.morimekta.providence.PMessageBuilder<MessageType>public <T> T get(int key)
get in interface net.morimekta.providence.PMessageOrBuilder<MessageType>public boolean has(int key)
has in interface net.morimekta.providence.PMessageOrBuilder<MessageType>@Nonnull public MessageType._Builder addTo(int key, Object value)
addTo in class net.morimekta.providence.PMessageBuilder<MessageType>@Nonnull public MessageType._Builder clear(int key)
clear in class net.morimekta.providence.PMessageBuilder<MessageType>public boolean valid()
valid in class net.morimekta.providence.PMessageBuilder<MessageType>public MessageType._Builder validate()
validate in class net.morimekta.providence.PMessageBuilder<MessageType>@Nonnull public net.morimekta.providence.descriptor.PStructDescriptor<MessageType> descriptor()
descriptor in interface net.morimekta.providence.PMessageOrBuilder<MessageType>descriptor in interface net.morimekta.providence.PValue<MessageType>public void readBinary(net.morimekta.util.io.BigEndianBinaryReader reader,
boolean strict)
throws IOException
readBinary in interface net.morimekta.providence.serializer.binary.BinaryReaderIOException@Nonnull public MessageType build()
build in interface Decl._Builderbuild in class net.morimekta.providence.PMessageBuilder<MessageType>Copyright © 2015–2020 morimekta.net. All rights reserved.