Class ProgramType._Builder
- java.lang.Object
-
- net.morimekta.providence.PMessageBuilder<ProgramType>
-
- net.morimekta.providence.model.ProgramType._Builder
-
- All Implemented Interfaces:
ProgramType_OrBuilder
,net.morimekta.providence.PMessageOrBuilder<ProgramType>
,net.morimekta.providence.PValue<ProgramType>
,net.morimekta.providence.serializer.binary.BinaryReader
- Enclosing class:
- ProgramType
public static class ProgramType._Builder extends net.morimekta.providence.PMessageBuilder<ProgramType> implements ProgramType_OrBuilder, net.morimekta.providence.serializer.binary.BinaryReader
<namespace>* <include>* <declataion>*
-
-
Constructor Summary
Constructors Constructor Description _Builder()
Make a p_model.ProgramType builder instance._Builder(ProgramType base)
Make a mutating builder off a base p_model.ProgramType.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ProgramType._Builder
addTo(int key, java.lang.Object value)
ProgramType._Builder
addToDecl(Declaration... values)
Adds entries to thedecl
list.ProgramType
build()
ProgramType._Builder
clear(int key)
ProgramType._Builder
clearDecl()
Clear thedecl
field.ProgramType._Builder
clearDocumentation()
Clear thedocumentation
field.ProgramType._Builder
clearIncludes()
Clear theincludes
field.ProgramType._Builder
clearNamespaces()
Clear thenamespaces
field.ProgramType._Builder
clearProgramName()
Clear theprogram_name
field.net.morimekta.providence.descriptor.PStructDescriptor<ProgramType>
descriptor()
boolean
equals(java.lang.Object o)
<T> T
get(int key)
java.util.List<Declaration>
getDecl()
List of declarations in the program file.java.lang.String
getDocumentation()
Program documentation must come before the first statement of the header.java.util.Map<java.lang.String,java.lang.String>
getIncludes()
List of included thrift files.java.util.Map<java.lang.String,java.lang.String>
getNamespaces()
Map of language to laguage dependent namespace identifier.java.lang.String
getProgramName()
The program name, deducted from the .thrift IDL file name.boolean
has(int key)
boolean
hasDecl()
Checks for presence of thedecl
field.boolean
hasDocumentation()
Checks for presence of thedocumentation
field.int
hashCode()
boolean
hasIncludes()
Checks for presence of theincludes
field.boolean
hasNamespaces()
Checks for presence of thenamespaces
field.boolean
hasProgramName()
Checks for presence of theprogram_name
field.boolean
isModified(int key)
boolean
isModifiedDecl()
Checks if thedecl
field has been modified since the builder was created.boolean
isModifiedDocumentation()
Checks if thedocumentation
field has been modified since the builder was created.boolean
isModifiedIncludes()
Checks if theincludes
field has been modified since the builder was created.boolean
isModifiedNamespaces()
Checks if thenamespaces
field has been modified since the builder was created.boolean
isModifiedProgramName()
Checks if theprogram_name
field has been modified since the builder was created.boolean
isSet(int key)
boolean
isSetDecl()
Checks for explicit presence of thedecl
field.boolean
isSetDocumentation()
Checks for explicit presence of thedocumentation
field.boolean
isSetIncludes()
Checks for explicit presence of theincludes
field.boolean
isSetNamespaces()
Checks for explicit presence of thenamespaces
field.boolean
isSetProgramName()
Checks for explicit presence of theprogram_name
field.ProgramType._Builder
merge(ProgramType from)
java.util.List<Declaration>
mutableDecl()
List of declarations in the program file.java.util.Map<java.lang.String,java.lang.String>
mutableIncludes()
List of included thrift files.java.util.Map<java.lang.String,java.lang.String>
mutableNamespaces()
Map of language to laguage dependent namespace identifier.net.morimekta.providence.PMessageBuilder
mutator(int key)
int
numDecl()
List of declarations in the program file.int
numIncludes()
List of included thrift files.int
numNamespaces()
Map of language to laguage dependent namespace identifier.java.util.Optional<java.util.List<Declaration>>
optionalDecl()
List of declarations in the program file.java.util.Optional<java.lang.String>
optionalDocumentation()
Program documentation must come before the first statement of the header.java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>
optionalIncludes()
List of included thrift files.java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>
optionalNamespaces()
Map of language to laguage dependent namespace identifier.ProgramType._Builder
putInIncludes(java.lang.String key, java.lang.String value)
Adds a mapping to theincludes
map.ProgramType._Builder
putInNamespaces(java.lang.String key, java.lang.String value)
Adds a mapping to thenamespaces
map.void
readBinary(net.morimekta.util.io.BigEndianBinaryReader reader, boolean strict)
ProgramType._Builder
set(int key, java.lang.Object value)
ProgramType._Builder
setDecl(java.util.Collection<Declaration> value)
Set thedecl
field value.ProgramType._Builder
setDocumentation(java.lang.String value)
Set thedocumentation
field value.ProgramType._Builder
setIncludes(java.util.Map<java.lang.String,java.lang.String> value)
Set theincludes
field value.ProgramType._Builder
setNamespaces(java.util.Map<java.lang.String,java.lang.String> value)
Set thenamespaces
field value.ProgramType._Builder
setProgramName(java.lang.String value)
Set theprogram_name
field value.boolean
valid()
ProgramType._Builder
validate()
-
Methods inherited from class net.morimekta.providence.PMessageBuilder
addTo, clear, isModified, isSet, modifiedFieldNames, modifiedFields, mutator, presentFieldNames, presentFields, set
-
-
-
-
Constructor Detail
-
_Builder
public _Builder()
Make a p_model.ProgramType builder instance.
-
_Builder
public _Builder(ProgramType base)
Make a mutating builder off a base p_model.ProgramType.- Parameters:
base
- The base ProgramType
-
-
Method Detail
-
merge
@Nonnull public ProgramType._Builder merge(ProgramType from)
- Specified by:
merge
in classnet.morimekta.providence.PMessageBuilder<ProgramType>
-
setDocumentation
@Nonnull public ProgramType._Builder setDocumentation(java.lang.String value)
Set thedocumentation
field value.Program documentation must come before the first statement of the header.
- Parameters:
value
- The new value- Returns:
- The builder
-
isSetDocumentation
public boolean isSetDocumentation()
Checks for explicit presence of thedocumentation
field.- Returns:
- True if documentation has been set.
-
hasDocumentation
public boolean hasDocumentation()
Checks for presence of thedocumentation
field.- Specified by:
hasDocumentation
in interfaceProgramType_OrBuilder
- Returns:
- True if documentation is present.
-
isModifiedDocumentation
public boolean isModifiedDocumentation()
Checks if thedocumentation
field has been modified since the builder was created.- Returns:
- True if documentation has been modified.
-
clearDocumentation
@Nonnull public ProgramType._Builder clearDocumentation()
Clear thedocumentation
field.- Returns:
- The builder
-
getDocumentation
public java.lang.String getDocumentation()
Program documentation must come before the first statement of the header.- Specified by:
getDocumentation
in interfaceProgramType_OrBuilder
- Returns:
- The
documentation
field value
-
optionalDocumentation
@Nonnull public java.util.Optional<java.lang.String> optionalDocumentation()
Program documentation must come before the first statement of the header.- Specified by:
optionalDocumentation
in interfaceProgramType_OrBuilder
- Returns:
- Optional
documentation
field value
-
setProgramName
@Nonnull public ProgramType._Builder setProgramName(java.lang.String value)
Set theprogram_name
field value.The program name, deducted from the .thrift IDL file name.
- Parameters:
value
- The new value- Returns:
- The builder
-
isSetProgramName
public boolean isSetProgramName()
Checks for explicit presence of theprogram_name
field.- Returns:
- True if program_name has been set.
-
hasProgramName
public boolean hasProgramName()
Checks for presence of theprogram_name
field.- Specified by:
hasProgramName
in interfaceProgramType_OrBuilder
- Returns:
- True if program_name is present.
-
isModifiedProgramName
public boolean isModifiedProgramName()
Checks if theprogram_name
field has been modified since the builder was created.- Returns:
- True if program_name has been modified.
-
clearProgramName
@Nonnull public ProgramType._Builder clearProgramName()
Clear theprogram_name
field.- Returns:
- The builder
-
getProgramName
public java.lang.String getProgramName()
The program name, deducted from the .thrift IDL file name.- Specified by:
getProgramName
in interfaceProgramType_OrBuilder
- Returns:
- The
program_name
field value
-
setIncludes
@Nonnull public ProgramType._Builder setIncludes(java.util.Map<java.lang.String,java.lang.String> value)
Set theincludes
field value.List of included thrift files. Same as from the actual thrift file.
include "<program>.thrift"
- Parameters:
value
- The new value- Returns:
- The builder
-
putInIncludes
@Nonnull public ProgramType._Builder putInIncludes(java.lang.String key, java.lang.String value)
Adds a mapping to theincludes
map.List of included thrift files. Same as from the actual thrift file.
include "<program>.thrift"
- Parameters:
key
- The inserted keyvalue
- The inserted value- Returns:
- The builder
-
isSetIncludes
public boolean isSetIncludes()
Checks for explicit presence of theincludes
field.- Returns:
- True if includes has been set.
-
hasIncludes
public boolean hasIncludes()
Checks for presence of theincludes
field.- Specified by:
hasIncludes
in interfaceProgramType_OrBuilder
- Returns:
- True if includes is present.
-
isModifiedIncludes
public boolean isModifiedIncludes()
Checks if theincludes
field has been modified since the builder was created.- Returns:
- True if includes has been modified.
-
clearIncludes
@Nonnull public ProgramType._Builder clearIncludes()
Clear theincludes
field.- Returns:
- The builder
-
mutableIncludes
public java.util.Map<java.lang.String,java.lang.String> mutableIncludes()
List of included thrift files. Same as from the actual thrift file.include "<program>.thrift"
- Returns:
- The mutable
includes
container
-
getIncludes
public java.util.Map<java.lang.String,java.lang.String> getIncludes()
List of included thrift files. Same as from the actual thrift file.include "<program>.thrift"
- Specified by:
getIncludes
in interfaceProgramType_OrBuilder
- Returns:
- The
includes
field value
-
optionalIncludes
@Nonnull public java.util.Optional<java.util.Map<java.lang.String,java.lang.String>> optionalIncludes()
List of included thrift files. Same as from the actual thrift file.include "<program>.thrift"
- Specified by:
optionalIncludes
in interfaceProgramType_OrBuilder
- Returns:
- Optional
includes
field value
-
numIncludes
public int numIncludes()
List of included thrift files. Same as from the actual thrift file.include "<program>.thrift"
- Specified by:
numIncludes
in interfaceProgramType_OrBuilder
- Returns:
- Number of entries in
includes
.
-
setNamespaces
@Nonnull public ProgramType._Builder setNamespaces(java.util.Map<java.lang.String,java.lang.String> value)
Set thenamespaces
field value.Map of language to laguage dependent namespace identifier.
namespace <key> <value>
- Parameters:
value
- The new value- Returns:
- The builder
-
putInNamespaces
@Nonnull public ProgramType._Builder putInNamespaces(java.lang.String key, java.lang.String value)
Adds a mapping to thenamespaces
map.Map of language to laguage dependent namespace identifier.
namespace <key> <value>
- Parameters:
key
- The inserted keyvalue
- The inserted value- Returns:
- The builder
-
isSetNamespaces
public boolean isSetNamespaces()
Checks for explicit presence of thenamespaces
field.- Returns:
- True if namespaces has been set.
-
hasNamespaces
public boolean hasNamespaces()
Checks for presence of thenamespaces
field.- Specified by:
hasNamespaces
in interfaceProgramType_OrBuilder
- Returns:
- True if namespaces is present.
-
isModifiedNamespaces
public boolean isModifiedNamespaces()
Checks if thenamespaces
field has been modified since the builder was created.- Returns:
- True if namespaces has been modified.
-
clearNamespaces
@Nonnull public ProgramType._Builder clearNamespaces()
Clear thenamespaces
field.- Returns:
- The builder
-
mutableNamespaces
public java.util.Map<java.lang.String,java.lang.String> mutableNamespaces()
Map of language to laguage dependent namespace identifier.namespace <key> <value>
- Returns:
- The mutable
namespaces
container
-
getNamespaces
public java.util.Map<java.lang.String,java.lang.String> getNamespaces()
Map of language to laguage dependent namespace identifier.namespace <key> <value>
- Specified by:
getNamespaces
in interfaceProgramType_OrBuilder
- Returns:
- The
namespaces
field value
-
optionalNamespaces
@Nonnull public java.util.Optional<java.util.Map<java.lang.String,java.lang.String>> optionalNamespaces()
Map of language to laguage dependent namespace identifier.namespace <key> <value>
- Specified by:
optionalNamespaces
in interfaceProgramType_OrBuilder
- Returns:
- Optional
namespaces
field value
-
numNamespaces
public int numNamespaces()
Map of language to laguage dependent namespace identifier.namespace <key> <value>
- Specified by:
numNamespaces
in interfaceProgramType_OrBuilder
- Returns:
- Number of entries in
namespaces
.
-
setDecl
@Nonnull public ProgramType._Builder setDecl(java.util.Collection<Declaration> value)
Set thedecl
field value.List of declarations in the program file. Same order as in the thrift file.
- Parameters:
value
- The new value- Returns:
- The builder
-
addToDecl
@Nonnull public ProgramType._Builder addToDecl(Declaration... values)
Adds entries to thedecl
list.List of declarations in the program file. Same order as in the thrift file.
- Parameters:
values
- The added value- Returns:
- The builder
-
isSetDecl
public boolean isSetDecl()
Checks for explicit presence of thedecl
field.- Returns:
- True if decl has been set.
-
hasDecl
public boolean hasDecl()
Checks for presence of thedecl
field.- Specified by:
hasDecl
in interfaceProgramType_OrBuilder
- Returns:
- True if decl is present.
-
isModifiedDecl
public boolean isModifiedDecl()
Checks if thedecl
field has been modified since the builder was created.- Returns:
- True if decl has been modified.
-
clearDecl
@Nonnull public ProgramType._Builder clearDecl()
Clear thedecl
field.- Returns:
- The builder
-
mutableDecl
public java.util.List<Declaration> mutableDecl()
List of declarations in the program file. Same order as in the thrift file.- Returns:
- The mutable
decl
container
-
getDecl
public java.util.List<Declaration> getDecl()
List of declarations in the program file. Same order as in the thrift file.- Specified by:
getDecl
in interfaceProgramType_OrBuilder
- Returns:
- The
decl
field value
-
optionalDecl
@Nonnull public java.util.Optional<java.util.List<Declaration>> optionalDecl()
List of declarations in the program file. Same order as in the thrift file.- Specified by:
optionalDecl
in interfaceProgramType_OrBuilder
- Returns:
- Optional
decl
field value
-
numDecl
public int numDecl()
List of declarations in the program file. Same order as in the thrift file.- Specified by:
numDecl
in interfaceProgramType_OrBuilder
- Returns:
- Number of entries in
decl
.
-
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<ProgramType>
-
set
@Nonnull public ProgramType._Builder set(int key, java.lang.Object value)
- Specified by:
set
in classnet.morimekta.providence.PMessageBuilder<ProgramType>
-
isSet
public boolean isSet(int key)
- Specified by:
isSet
in classnet.morimekta.providence.PMessageBuilder<ProgramType>
-
isModified
public boolean isModified(int key)
- Specified by:
isModified
in classnet.morimekta.providence.PMessageBuilder<ProgramType>
-
get
public <T> T get(int key)
- Specified by:
get
in interfacenet.morimekta.providence.PMessageOrBuilder<ProgramType>
-
has
public boolean has(int key)
- Specified by:
has
in interfacenet.morimekta.providence.PMessageOrBuilder<ProgramType>
-
addTo
@Nonnull public ProgramType._Builder addTo(int key, java.lang.Object value)
- Specified by:
addTo
in classnet.morimekta.providence.PMessageBuilder<ProgramType>
-
clear
@Nonnull public ProgramType._Builder clear(int key)
- Specified by:
clear
in classnet.morimekta.providence.PMessageBuilder<ProgramType>
-
valid
public boolean valid()
- Specified by:
valid
in classnet.morimekta.providence.PMessageBuilder<ProgramType>
-
validate
public ProgramType._Builder validate()
- Specified by:
validate
in classnet.morimekta.providence.PMessageBuilder<ProgramType>
-
descriptor
@Nonnull public net.morimekta.providence.descriptor.PStructDescriptor<ProgramType> descriptor()
- Specified by:
descriptor
in interfacenet.morimekta.providence.PMessageOrBuilder<ProgramType>
- Specified by:
descriptor
in interfacenet.morimekta.providence.PValue<ProgramType>
-
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 ProgramType build()
- Specified by:
build
in classnet.morimekta.providence.PMessageBuilder<ProgramType>
-
-