Package net.morimekta.providence.model
Class Declaration._Builder
- java.lang.Object
-
- net.morimekta.providence.PMessageBuilder<Declaration,Declaration._Field>
-
- net.morimekta.providence.model.Declaration._Builder
-
- All Implemented Interfaces:
net.morimekta.providence.PBuilder<Declaration>,net.morimekta.providence.serializer.binary.BinaryReader
- Enclosing class:
- Declaration
public static class Declaration._Builder extends net.morimekta.providence.PMessageBuilder<Declaration,Declaration._Field> implements net.morimekta.providence.serializer.binary.BinaryReader
( <enum> | <typedef> | <struct> | <service> | <const> )
-
-
Constructor Summary
Constructors Constructor Description _Builder()Make a pmodel.Declaration builder instance._Builder(Declaration base)Make a mutating builder off a base pmodel.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,Declaration._Field>descriptor()booleanequals(java.lang.Object o)ConstTypegetDeclConst()EnumTypegetDeclEnum()MessageTypegetDeclMessage()ServiceTypegetDeclService()TypedefTypegetDeclTypedef()inthashCode()booleanisModified(int key)booleanisSet(int key)booleanisSetDeclConst()Checks for presence of thedecl_constfield.booleanisSetDeclEnum()Checks for presence of thedecl_enumfield.booleanisSetDeclMessage()Checks for presence of thedecl_messagefield.booleanisSetDeclService()Checks for presence of thedecl_servicefield.booleanisSetDeclTypedef()Checks for 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)voidreadBinary(net.morimekta.util.io.BigEndianBinaryReader reader, boolean strict)Declaration._Builderset(int key, java.lang.Object value)Declaration._BuildersetDeclConst(ConstType value)Set thedecl_constfield value.Declaration._BuildersetDeclConst(ConstType._Builder builder)Set thedecl_constfield value.Declaration._BuildersetDeclEnum(EnumType value)Set thedecl_enumfield value.Declaration._BuildersetDeclEnum(EnumType._Builder builder)Set thedecl_enumfield value.Declaration._BuildersetDeclMessage(MessageType value)Set thedecl_messagefield value.Declaration._BuildersetDeclMessage(MessageType._Builder builder)Set thedecl_messagefield value.Declaration._BuildersetDeclService(ServiceType value)Set thedecl_servicefield value.Declaration._BuildersetDeclService(ServiceType._Builder builder)Set thedecl_servicefield value.Declaration._BuildersetDeclTypedef(TypedefType value)Set thedecl_typedeffield value.Declaration._BuildersetDeclTypedef(TypedefType._Builder builder)Set thedecl_typedeffield value.booleanvalid()voidvalidate()
-
-
-
Constructor Detail
-
_Builder
public _Builder()
Make a pmodel.Declaration builder instance.
-
_Builder
public _Builder(Declaration base)
Make a mutating builder off a base pmodel.Declaration.- Parameters:
base- The base Declaration
-
-
Method Detail
-
merge
@Nonnull public Declaration._Builder merge(Declaration from)
- Specified by:
mergein classnet.morimekta.providence.PMessageBuilder<Declaration,Declaration._Field>
-
setDeclEnum
@Nonnull public Declaration._Builder setDeclEnum(EnumType value)
Set thedecl_enumfield value.- Parameters:
value- The new value- Returns:
- The builder
-
setDeclEnum
@Nonnull public Declaration._Builder setDeclEnum(EnumType._Builder builder)
Set thedecl_enumfield value.- Parameters:
builder- builder for the new value- Returns:
- The builder
-
isSetDeclEnum
public boolean isSetDeclEnum()
Checks for presence of thedecl_enumfield.- Returns:
- True if decl_enum has been set.
-
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()
- Returns:
- The field value
-
setDeclTypedef
@Nonnull public Declaration._Builder setDeclTypedef(TypedefType value)
Set thedecl_typedeffield value.- Parameters:
value- The new value- Returns:
- The builder
-
setDeclTypedef
@Nonnull public Declaration._Builder setDeclTypedef(TypedefType._Builder builder)
Set thedecl_typedeffield value.- Parameters:
builder- builder for the new value- Returns:
- The builder
-
isSetDeclTypedef
public boolean isSetDeclTypedef()
Checks for presence of thedecl_typedeffield.- Returns:
- True if decl_typedef has been set.
-
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()
- Returns:
- The field value
-
setDeclMessage
@Nonnull public Declaration._Builder setDeclMessage(MessageType value)
Set thedecl_messagefield value.- Parameters:
value- The new value- Returns:
- The builder
-
setDeclMessage
@Nonnull public Declaration._Builder setDeclMessage(MessageType._Builder builder)
Set thedecl_messagefield value.- Parameters:
builder- builder for the new value- Returns:
- The builder
-
isSetDeclMessage
public boolean isSetDeclMessage()
Checks for presence of thedecl_messagefield.- Returns:
- True if decl_message has been set.
-
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()
- Returns:
- The field value
-
setDeclService
@Nonnull public Declaration._Builder setDeclService(ServiceType value)
Set thedecl_servicefield value.- Parameters:
value- The new value- Returns:
- The builder
-
setDeclService
@Nonnull public Declaration._Builder setDeclService(ServiceType._Builder builder)
Set thedecl_servicefield value.- Parameters:
builder- builder for the new value- Returns:
- The builder
-
isSetDeclService
public boolean isSetDeclService()
Checks for presence of thedecl_servicefield.- Returns:
- True if decl_service has been set.
-
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()
- Returns:
- The field value
-
setDeclConst
@Nonnull public Declaration._Builder setDeclConst(ConstType value)
Set thedecl_constfield value.- Parameters:
value- The new value- Returns:
- The builder
-
setDeclConst
@Nonnull public Declaration._Builder setDeclConst(ConstType._Builder builder)
Set thedecl_constfield value.- Parameters:
builder- builder for the new value- Returns:
- The builder
-
isSetDeclConst
public boolean isSetDeclConst()
Checks for presence of thedecl_constfield.- Returns:
- True if decl_const has been set.
-
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()
- Returns:
- The field 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,Declaration._Field>
-
set
@Nonnull public Declaration._Builder set(int key, java.lang.Object value)
- Specified by:
setin classnet.morimekta.providence.PMessageBuilder<Declaration,Declaration._Field>
-
isSet
public boolean isSet(int key)
- Specified by:
isSetin classnet.morimekta.providence.PMessageBuilder<Declaration,Declaration._Field>
-
isModified
public boolean isModified(int key)
- Specified by:
isModifiedin classnet.morimekta.providence.PMessageBuilder<Declaration,Declaration._Field>
-
addTo
@Nonnull public Declaration._Builder addTo(int key, java.lang.Object value)
- Specified by:
addToin classnet.morimekta.providence.PMessageBuilder<Declaration,Declaration._Field>
-
clear
@Nonnull public Declaration._Builder clear(int key)
- Specified by:
clearin classnet.morimekta.providence.PMessageBuilder<Declaration,Declaration._Field>
-
valid
public boolean valid()
- Specified by:
validin classnet.morimekta.providence.PMessageBuilder<Declaration,Declaration._Field>
-
validate
public void validate()
- Specified by:
validatein classnet.morimekta.providence.PMessageBuilder<Declaration,Declaration._Field>
-
descriptor
@Nonnull public net.morimekta.providence.descriptor.PUnionDescriptor<Declaration,Declaration._Field> descriptor()
- Specified by:
descriptorin classnet.morimekta.providence.PMessageBuilder<Declaration,Declaration._Field>
-
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
public Declaration build()
- Specified by:
buildin interfacenet.morimekta.providence.PBuilder<Declaration>
-
-