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.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._Builder
addTo(int key, java.lang.Object value)
Declaration
build()
Declaration._Builder
clear(int key)
Declaration._Builder
clearDeclConst()
Clear thedecl_const
field.Declaration._Builder
clearDeclEnum()
Clear thedecl_enum
field.Declaration._Builder
clearDeclMessage()
Clear thedecl_message
field.Declaration._Builder
clearDeclService()
Clear thedecl_service
field.Declaration._Builder
clearDeclTypedef()
Clear thedecl_typedef
field.net.morimekta.providence.descriptor.PUnionDescriptor<Declaration>
descriptor()
boolean
equals(java.lang.Object o)
<T> T
get(int key)
ConstType
getDeclConst()
EnumType
getDeclEnum()
MessageType
getDeclMessage()
ServiceType
getDeclService()
TypedefType
getDeclTypedef()
boolean
has(int key)
boolean
hasDeclConst()
Checks for presence of thedecl_const
field.boolean
hasDeclEnum()
Checks for presence of thedecl_enum
field.boolean
hasDeclMessage()
Checks for presence of thedecl_message
field.boolean
hasDeclService()
Checks for presence of thedecl_service
field.boolean
hasDeclTypedef()
Checks for presence of thedecl_typedef
field.int
hashCode()
boolean
isModified(int key)
boolean
isSet(int key)
boolean
isSetDeclConst()
Checks for explicit presence of thedecl_const
field.boolean
isSetDeclEnum()
Checks for explicit presence of thedecl_enum
field.boolean
isSetDeclMessage()
Checks for explicit presence of thedecl_message
field.boolean
isSetDeclService()
Checks for explicit presence of thedecl_service
field.boolean
isSetDeclTypedef()
Checks for explicit presence of thedecl_typedef
field.boolean
isUnionModified()
Checks if theDeclaration
union has been modified since the builder was created.Declaration._Builder
merge(Declaration from)
ConstType._Builder
mutableDeclConst()
Get the builder for the containeddecl_const
message field.EnumType._Builder
mutableDeclEnum()
Get the builder for the containeddecl_enum
message field.MessageType._Builder
mutableDeclMessage()
Get the builder for the containeddecl_message
message field.ServiceType._Builder
mutableDeclService()
Get the builder for the containeddecl_service
message field.TypedefType._Builder
mutableDeclTypedef()
Get the builder for the containeddecl_typedef
message field.net.morimekta.providence.PMessageBuilder
mutator(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()
void
readBinary(net.morimekta.util.io.BigEndianBinaryReader reader, boolean strict)
Declaration._Builder
set(int key, java.lang.Object value)
Declaration._Builder
setDeclConst(ConstType_OrBuilder value)
Set thedecl_const
field value.Declaration._Builder
setDeclEnum(EnumType_OrBuilder value)
Set thedecl_enum
field value.Declaration._Builder
setDeclMessage(MessageType_OrBuilder value)
Set thedecl_message
field value.Declaration._Builder
setDeclService(ServiceType_OrBuilder value)
Set thedecl_service
field value.Declaration._Builder
setDeclTypedef(TypedefType_OrBuilder value)
Set thedecl_typedef
field value.boolean
valid()
Declaration._Builder
validate()
-
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:
merge
in classnet.morimekta.providence.PMessageBuilder<Declaration>
-
setDeclEnum
@Nonnull public Declaration._Builder setDeclEnum(EnumType_OrBuilder value)
Set thedecl_enum
field value.- Parameters:
value
- The new value- Returns:
- The builder
-
isSetDeclEnum
public boolean isSetDeclEnum()
Checks for explicit presence of thedecl_enum
field.- Returns:
- True if decl_enum has been set.
-
hasDeclEnum
public boolean hasDeclEnum()
Checks for presence of thedecl_enum
field.- Specified by:
hasDeclEnum
in interfaceDeclaration_OrBuilder
- Returns:
- True if decl_enum is present.
-
clearDeclEnum
@Nonnull public Declaration._Builder clearDeclEnum()
Clear thedecl_enum
field.- Returns:
- The builder
-
mutableDeclEnum
@Nonnull public EnumType._Builder mutableDeclEnum()
Get the builder for the containeddecl_enum
message field.- Returns:
- The field message builder
-
getDeclEnum
public EnumType getDeclEnum()
- Specified by:
getDeclEnum
in interfaceDeclaration_OrBuilder
- Returns:
- The
decl_enum
field value
-
optionalDeclEnum
@Nonnull public java.util.Optional<EnumType> optionalDeclEnum()
- Specified by:
optionalDeclEnum
in interfaceDeclaration_OrBuilder
- Returns:
- Optional
decl_enum
field value
-
setDeclTypedef
@Nonnull public Declaration._Builder setDeclTypedef(TypedefType_OrBuilder value)
Set thedecl_typedef
field value.- Parameters:
value
- The new value- Returns:
- The builder
-
isSetDeclTypedef
public boolean isSetDeclTypedef()
Checks for explicit presence of thedecl_typedef
field.- Returns:
- True if decl_typedef has been set.
-
hasDeclTypedef
public boolean hasDeclTypedef()
Checks for presence of thedecl_typedef
field.- Specified by:
hasDeclTypedef
in interfaceDeclaration_OrBuilder
- Returns:
- True if decl_typedef is present.
-
clearDeclTypedef
@Nonnull public Declaration._Builder clearDeclTypedef()
Clear thedecl_typedef
field.- Returns:
- The builder
-
mutableDeclTypedef
@Nonnull public TypedefType._Builder mutableDeclTypedef()
Get the builder for the containeddecl_typedef
message field.- Returns:
- The field message builder
-
getDeclTypedef
public TypedefType getDeclTypedef()
- Specified by:
getDeclTypedef
in interfaceDeclaration_OrBuilder
- Returns:
- The
decl_typedef
field value
-
optionalDeclTypedef
@Nonnull public java.util.Optional<TypedefType> optionalDeclTypedef()
- Specified by:
optionalDeclTypedef
in interfaceDeclaration_OrBuilder
- Returns:
- Optional
decl_typedef
field value
-
setDeclMessage
@Nonnull public Declaration._Builder setDeclMessage(MessageType_OrBuilder value)
Set thedecl_message
field value.- Parameters:
value
- The new value- Returns:
- The builder
-
isSetDeclMessage
public boolean isSetDeclMessage()
Checks for explicit presence of thedecl_message
field.- Returns:
- True if decl_message has been set.
-
hasDeclMessage
public boolean hasDeclMessage()
Checks for presence of thedecl_message
field.- Specified by:
hasDeclMessage
in interfaceDeclaration_OrBuilder
- Returns:
- True if decl_message is present.
-
clearDeclMessage
@Nonnull public Declaration._Builder clearDeclMessage()
Clear thedecl_message
field.- Returns:
- The builder
-
mutableDeclMessage
@Nonnull public MessageType._Builder mutableDeclMessage()
Get the builder for the containeddecl_message
message field.- Returns:
- The field message builder
-
getDeclMessage
public MessageType getDeclMessage()
- Specified by:
getDeclMessage
in interfaceDeclaration_OrBuilder
- Returns:
- The
decl_message
field value
-
optionalDeclMessage
@Nonnull public java.util.Optional<MessageType> optionalDeclMessage()
- Specified by:
optionalDeclMessage
in interfaceDeclaration_OrBuilder
- Returns:
- Optional
decl_message
field value
-
setDeclService
@Nonnull public Declaration._Builder setDeclService(ServiceType_OrBuilder value)
Set thedecl_service
field value.- Parameters:
value
- The new value- Returns:
- The builder
-
isSetDeclService
public boolean isSetDeclService()
Checks for explicit presence of thedecl_service
field.- Returns:
- True if decl_service has been set.
-
hasDeclService
public boolean hasDeclService()
Checks for presence of thedecl_service
field.- Specified by:
hasDeclService
in interfaceDeclaration_OrBuilder
- Returns:
- True if decl_service is present.
-
clearDeclService
@Nonnull public Declaration._Builder clearDeclService()
Clear thedecl_service
field.- Returns:
- The builder
-
mutableDeclService
@Nonnull public ServiceType._Builder mutableDeclService()
Get the builder for the containeddecl_service
message field.- Returns:
- The field message builder
-
getDeclService
public ServiceType getDeclService()
- Specified by:
getDeclService
in interfaceDeclaration_OrBuilder
- Returns:
- The
decl_service
field value
-
optionalDeclService
@Nonnull public java.util.Optional<ServiceType> optionalDeclService()
- Specified by:
optionalDeclService
in interfaceDeclaration_OrBuilder
- Returns:
- Optional
decl_service
field value
-
setDeclConst
@Nonnull public Declaration._Builder setDeclConst(ConstType_OrBuilder value)
Set thedecl_const
field value.- Parameters:
value
- The new value- Returns:
- The builder
-
isSetDeclConst
public boolean isSetDeclConst()
Checks for explicit presence of thedecl_const
field.- Returns:
- True if decl_const has been set.
-
hasDeclConst
public boolean hasDeclConst()
Checks for presence of thedecl_const
field.- Specified by:
hasDeclConst
in interfaceDeclaration_OrBuilder
- Returns:
- True if decl_const is present.
-
clearDeclConst
@Nonnull public Declaration._Builder clearDeclConst()
Clear thedecl_const
field.- Returns:
- The builder
-
mutableDeclConst
@Nonnull public ConstType._Builder mutableDeclConst()
Get the builder for the containeddecl_const
message field.- Returns:
- The field message builder
-
getDeclConst
public ConstType getDeclConst()
- Specified by:
getDeclConst
in interfaceDeclaration_OrBuilder
- Returns:
- The
decl_const
field value
-
optionalDeclConst
@Nonnull public java.util.Optional<ConstType> optionalDeclConst()
- Specified by:
optionalDeclConst
in interfaceDeclaration_OrBuilder
- Returns:
- Optional
decl_const
field value
-
isUnionModified
public boolean isUnionModified()
Checks if theDeclaration
union has been modified since the builder was created.- Returns:
- True if Declaration has been modified.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
mutator
public net.morimekta.providence.PMessageBuilder mutator(int key)
- Specified by:
mutator
in classnet.morimekta.providence.PMessageBuilder<Declaration>
-
set
@Nonnull public Declaration._Builder set(int key, java.lang.Object value)
- Specified by:
set
in classnet.morimekta.providence.PMessageBuilder<Declaration>
-
isSet
public boolean isSet(int key)
- Specified by:
isSet
in classnet.morimekta.providence.PMessageBuilder<Declaration>
-
isModified
public boolean isModified(int key)
- Specified by:
isModified
in classnet.morimekta.providence.PMessageBuilder<Declaration>
-
get
public <T> T get(int key)
- Specified by:
get
in interfacenet.morimekta.providence.PMessageOrBuilder<Declaration>
-
has
public boolean has(int key)
- Specified by:
has
in interfacenet.morimekta.providence.PMessageOrBuilder<Declaration>
-
addTo
@Nonnull public Declaration._Builder addTo(int key, java.lang.Object value)
- Specified by:
addTo
in classnet.morimekta.providence.PMessageBuilder<Declaration>
-
clear
@Nonnull public Declaration._Builder clear(int key)
- Specified by:
clear
in classnet.morimekta.providence.PMessageBuilder<Declaration>
-
valid
public boolean valid()
- Specified by:
valid
in classnet.morimekta.providence.PMessageBuilder<Declaration>
-
validate
public Declaration._Builder validate()
- Specified by:
validate
in classnet.morimekta.providence.PMessageBuilder<Declaration>
-
descriptor
@Nonnull public net.morimekta.providence.descriptor.PUnionDescriptor<Declaration> descriptor()
- Specified by:
descriptor
in interfacenet.morimekta.providence.PMessageOrBuilder<Declaration>
- Specified by:
descriptor
in interfacenet.morimekta.providence.PValue<Declaration>
-
readBinary
public void readBinary(net.morimekta.util.io.BigEndianBinaryReader reader, boolean strict) throws java.io.IOException
- Specified by:
readBinary
in interfacenet.morimekta.providence.serializer.binary.BinaryReader
- Throws:
java.io.IOException
-
build
@Nonnull public Declaration build()
- Specified by:
build
in classnet.morimekta.providence.PMessageBuilder<Declaration>
-
-