Package net.morimekta.providence.model
Class Declaration._Builder
- java.lang.Object
-
- net.morimekta.providence.PMessageBuilder<Declaration>
-
- net.morimekta.providence.model.Declaration._Builder
-
- All Implemented Interfaces:
Declaration_OrBuilder,net.morimekta.providence.PBuilder<Declaration>,net.morimekta.providence.PMessageOrBuilder<Declaration>,net.morimekta.providence.PValue<Declaration>,net.morimekta.providence.serializer.binary.BinaryReader
- Enclosing class:
- Declaration
public static class Declaration._Builder extends net.morimekta.providence.PMessageBuilder<Declaration> implements Declaration_OrBuilder, net.morimekta.providence.serializer.binary.BinaryReader
( <enum> | <typedef> | <struct> | <service> | <const> )
-
-
Constructor Summary
Constructors Constructor Description _Builder()Make a p_model.Declaration builder instance._Builder(Declaration base)Make a mutating builder off a base p_model.Declaration.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Declaration._BuilderaddTo(int key, java.lang.Object value)Declarationbuild()Declaration._Builderclear(int key)Declaration._BuilderclearDeclConst()Clear thedecl_constfield.Declaration._BuilderclearDeclEnum()Clear thedecl_enumfield.Declaration._BuilderclearDeclMessage()Clear thedecl_messagefield.Declaration._BuilderclearDeclService()Clear thedecl_servicefield.Declaration._BuilderclearDeclTypedef()Clear thedecl_typedeffield.net.morimekta.providence.descriptor.PUnionDescriptor<Declaration>descriptor()booleanequals(java.lang.Object o)<T> Tget(int key)ConstTypegetDeclConst()EnumTypegetDeclEnum()MessageTypegetDeclMessage()ServiceTypegetDeclService()TypedefTypegetDeclTypedef()booleanhas(int key)booleanhasDeclConst()Checks for presence of thedecl_constfield.booleanhasDeclEnum()Checks for presence of thedecl_enumfield.booleanhasDeclMessage()Checks for presence of thedecl_messagefield.booleanhasDeclService()Checks for presence of thedecl_servicefield.booleanhasDeclTypedef()Checks for presence of thedecl_typedeffield.inthashCode()booleanisModified(int key)booleanisSet(int key)booleanisSetDeclConst()Checks for explicit presence of thedecl_constfield.booleanisSetDeclEnum()Checks for explicit presence of thedecl_enumfield.booleanisSetDeclMessage()Checks for explicit presence of thedecl_messagefield.booleanisSetDeclService()Checks for explicit presence of thedecl_servicefield.booleanisSetDeclTypedef()Checks for explicit presence of thedecl_typedeffield.booleanisUnionModified()Checks if theDeclarationunion has been modified since the builder was created.Declaration._Buildermerge(Declaration from)ConstType._BuildermutableDeclConst()Get the builder for the containeddecl_constmessage field.EnumType._BuildermutableDeclEnum()Get the builder for the containeddecl_enummessage field.MessageType._BuildermutableDeclMessage()Get the builder for the containeddecl_messagemessage field.ServiceType._BuildermutableDeclService()Get the builder for the containeddecl_servicemessage field.TypedefType._BuildermutableDeclTypedef()Get the builder for the containeddecl_typedefmessage field.net.morimekta.providence.PMessageBuildermutator(int key)java.util.Optional<ConstType>optionalDeclConst()java.util.Optional<EnumType>optionalDeclEnum()java.util.Optional<MessageType>optionalDeclMessage()java.util.Optional<ServiceType>optionalDeclService()java.util.Optional<TypedefType>optionalDeclTypedef()voidreadBinary(net.morimekta.util.io.BigEndianBinaryReader reader, boolean strict)Declaration._Builderset(int key, java.lang.Object value)Declaration._BuildersetDeclConst(ConstType_OrBuilder value)Set thedecl_constfield value.Declaration._BuildersetDeclEnum(EnumType_OrBuilder value)Set thedecl_enumfield value.Declaration._BuildersetDeclMessage(MessageType_OrBuilder value)Set thedecl_messagefield value.Declaration._BuildersetDeclService(ServiceType_OrBuilder value)Set thedecl_servicefield value.Declaration._BuildersetDeclTypedef(TypedefType_OrBuilder value)Set thedecl_typedeffield value.booleanvalid()Declaration._Buildervalidate()-
Methods inherited from class net.morimekta.providence.PMessageBuilder
addTo, clear, isModified, isSet, modifiedFields, mutator, presentFields, set
-
-
-
-
Constructor Detail
-
_Builder
public _Builder()
Make a p_model.Declaration builder instance.
-
_Builder
public _Builder(Declaration base)
Make a mutating builder off a base p_model.Declaration.- Parameters:
base- The base Declaration
-
-
Method Detail
-
merge
@Nonnull public Declaration._Builder merge(Declaration from)
- Specified by:
mergein classnet.morimekta.providence.PMessageBuilder<Declaration>
-
setDeclEnum
@Nonnull public Declaration._Builder setDeclEnum(EnumType_OrBuilder value)
Set thedecl_enumfield value.- Parameters:
value- The new value- Returns:
- The builder
-
isSetDeclEnum
public boolean isSetDeclEnum()
Checks for explicit presence of thedecl_enumfield.- Returns:
- True if decl_enum has been set.
-
hasDeclEnum
public boolean hasDeclEnum()
Checks for presence of thedecl_enumfield.- Specified by:
hasDeclEnumin interfaceDeclaration_OrBuilder- Returns:
- True if decl_enum is present.
-
clearDeclEnum
@Nonnull public Declaration._Builder clearDeclEnum()
Clear thedecl_enumfield.- Returns:
- The builder
-
mutableDeclEnum
@Nonnull public EnumType._Builder mutableDeclEnum()
Get the builder for the containeddecl_enummessage field.- Returns:
- The field message builder
-
getDeclEnum
public EnumType getDeclEnum()
- Specified by:
getDeclEnumin interfaceDeclaration_OrBuilder- Returns:
- The
decl_enumfield value
-
optionalDeclEnum
@Nonnull public java.util.Optional<EnumType> optionalDeclEnum()
- Specified by:
optionalDeclEnumin interfaceDeclaration_OrBuilder- Returns:
- Optional
decl_enumfield value
-
setDeclTypedef
@Nonnull public Declaration._Builder setDeclTypedef(TypedefType_OrBuilder value)
Set thedecl_typedeffield value.- Parameters:
value- The new value- Returns:
- The builder
-
isSetDeclTypedef
public boolean isSetDeclTypedef()
Checks for explicit presence of thedecl_typedeffield.- Returns:
- True if decl_typedef has been set.
-
hasDeclTypedef
public boolean hasDeclTypedef()
Checks for presence of thedecl_typedeffield.- Specified by:
hasDeclTypedefin interfaceDeclaration_OrBuilder- Returns:
- True if decl_typedef is present.
-
clearDeclTypedef
@Nonnull public Declaration._Builder clearDeclTypedef()
Clear thedecl_typedeffield.- Returns:
- The builder
-
mutableDeclTypedef
@Nonnull public TypedefType._Builder mutableDeclTypedef()
Get the builder for the containeddecl_typedefmessage field.- Returns:
- The field message builder
-
getDeclTypedef
public TypedefType getDeclTypedef()
- Specified by:
getDeclTypedefin interfaceDeclaration_OrBuilder- Returns:
- The
decl_typedeffield value
-
optionalDeclTypedef
@Nonnull public java.util.Optional<TypedefType> optionalDeclTypedef()
- Specified by:
optionalDeclTypedefin interfaceDeclaration_OrBuilder- Returns:
- Optional
decl_typedeffield value
-
setDeclMessage
@Nonnull public Declaration._Builder setDeclMessage(MessageType_OrBuilder value)
Set thedecl_messagefield value.- Parameters:
value- The new value- Returns:
- The builder
-
isSetDeclMessage
public boolean isSetDeclMessage()
Checks for explicit presence of thedecl_messagefield.- Returns:
- True if decl_message has been set.
-
hasDeclMessage
public boolean hasDeclMessage()
Checks for presence of thedecl_messagefield.- Specified by:
hasDeclMessagein interfaceDeclaration_OrBuilder- Returns:
- True if decl_message is present.
-
clearDeclMessage
@Nonnull public Declaration._Builder clearDeclMessage()
Clear thedecl_messagefield.- Returns:
- The builder
-
mutableDeclMessage
@Nonnull public MessageType._Builder mutableDeclMessage()
Get the builder for the containeddecl_messagemessage field.- Returns:
- The field message builder
-
getDeclMessage
public MessageType getDeclMessage()
- Specified by:
getDeclMessagein interfaceDeclaration_OrBuilder- Returns:
- The
decl_messagefield value
-
optionalDeclMessage
@Nonnull public java.util.Optional<MessageType> optionalDeclMessage()
- Specified by:
optionalDeclMessagein interfaceDeclaration_OrBuilder- Returns:
- Optional
decl_messagefield value
-
setDeclService
@Nonnull public Declaration._Builder setDeclService(ServiceType_OrBuilder value)
Set thedecl_servicefield value.- Parameters:
value- The new value- Returns:
- The builder
-
isSetDeclService
public boolean isSetDeclService()
Checks for explicit presence of thedecl_servicefield.- Returns:
- True if decl_service has been set.
-
hasDeclService
public boolean hasDeclService()
Checks for presence of thedecl_servicefield.- Specified by:
hasDeclServicein interfaceDeclaration_OrBuilder- Returns:
- True if decl_service is present.
-
clearDeclService
@Nonnull public Declaration._Builder clearDeclService()
Clear thedecl_servicefield.- Returns:
- The builder
-
mutableDeclService
@Nonnull public ServiceType._Builder mutableDeclService()
Get the builder for the containeddecl_servicemessage field.- Returns:
- The field message builder
-
getDeclService
public ServiceType getDeclService()
- Specified by:
getDeclServicein interfaceDeclaration_OrBuilder- Returns:
- The
decl_servicefield value
-
optionalDeclService
@Nonnull public java.util.Optional<ServiceType> optionalDeclService()
- Specified by:
optionalDeclServicein interfaceDeclaration_OrBuilder- Returns:
- Optional
decl_servicefield value
-
setDeclConst
@Nonnull public Declaration._Builder setDeclConst(ConstType_OrBuilder value)
Set thedecl_constfield value.- Parameters:
value- The new value- Returns:
- The builder
-
isSetDeclConst
public boolean isSetDeclConst()
Checks for explicit presence of thedecl_constfield.- Returns:
- True if decl_const has been set.
-
hasDeclConst
public boolean hasDeclConst()
Checks for presence of thedecl_constfield.- Specified by:
hasDeclConstin interfaceDeclaration_OrBuilder- Returns:
- True if decl_const is present.
-
clearDeclConst
@Nonnull public Declaration._Builder clearDeclConst()
Clear thedecl_constfield.- Returns:
- The builder
-
mutableDeclConst
@Nonnull public ConstType._Builder mutableDeclConst()
Get the builder for the containeddecl_constmessage field.- Returns:
- The field message builder
-
getDeclConst
public ConstType getDeclConst()
- Specified by:
getDeclConstin interfaceDeclaration_OrBuilder- Returns:
- The
decl_constfield value
-
optionalDeclConst
@Nonnull public java.util.Optional<ConstType> optionalDeclConst()
- Specified by:
optionalDeclConstin interfaceDeclaration_OrBuilder- Returns:
- Optional
decl_constfield value
-
isUnionModified
public boolean isUnionModified()
Checks if theDeclarationunion has been modified since the builder was created.- Returns:
- True if Declaration has been modified.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
mutator
public net.morimekta.providence.PMessageBuilder mutator(int key)
- Specified by:
mutatorin classnet.morimekta.providence.PMessageBuilder<Declaration>
-
set
@Nonnull public Declaration._Builder set(int key, java.lang.Object value)
- Specified by:
setin classnet.morimekta.providence.PMessageBuilder<Declaration>
-
isSet
public boolean isSet(int key)
- Specified by:
isSetin classnet.morimekta.providence.PMessageBuilder<Declaration>
-
isModified
public boolean isModified(int key)
- Specified by:
isModifiedin classnet.morimekta.providence.PMessageBuilder<Declaration>
-
get
public <T> T get(int key)
- Specified by:
getin interfacenet.morimekta.providence.PMessageOrBuilder<Declaration>
-
has
public boolean has(int key)
- Specified by:
hasin interfacenet.morimekta.providence.PMessageOrBuilder<Declaration>
-
addTo
@Nonnull public Declaration._Builder addTo(int key, java.lang.Object value)
- Specified by:
addToin classnet.morimekta.providence.PMessageBuilder<Declaration>
-
clear
@Nonnull public Declaration._Builder clear(int key)
- Specified by:
clearin classnet.morimekta.providence.PMessageBuilder<Declaration>
-
valid
public boolean valid()
- Specified by:
validin classnet.morimekta.providence.PMessageBuilder<Declaration>
-
validate
public Declaration._Builder validate()
- Specified by:
validatein classnet.morimekta.providence.PMessageBuilder<Declaration>
-
descriptor
@Nonnull public net.morimekta.providence.descriptor.PUnionDescriptor<Declaration> descriptor()
- Specified by:
descriptorin interfacenet.morimekta.providence.PMessageOrBuilder<Declaration>- Specified by:
descriptorin interfacenet.morimekta.providence.PValue<Declaration>
-
readBinary
public void readBinary(net.morimekta.util.io.BigEndianBinaryReader reader, boolean strict) throws java.io.IOException- Specified by:
readBinaryin interfacenet.morimekta.providence.serializer.binary.BinaryReader- Throws:
java.io.IOException
-
build
@Nonnull public Declaration build()
- Specified by:
buildin interfacenet.morimekta.providence.PBuilder<Declaration>
-
-