public static class ProgramType._Builder extends PMessageBuilder<ProgramType,ProgramType._Field> implements BinaryReader
| Constructor and Description |
|---|
_Builder()
Make a pmodel.ProgramType builder instance.
|
_Builder(ProgramType base)
Make a mutating builder off a base pmodel.ProgramType.
|
| Modifier and Type | Method and Description |
|---|---|
ProgramType._Builder |
addTo(int key,
Object value) |
ProgramType._Builder |
addToDecl(Declaration... values)
Adds entries to the
decl list. |
ProgramType._Builder |
addToIncludes(String... values)
Adds entries to the
includes list. |
ProgramType |
build() |
ProgramType._Builder |
clear(int key) |
ProgramType._Builder |
clearDecl()
Clear the
decl field. |
ProgramType._Builder |
clearDocumentation()
Clear the
documentation field. |
ProgramType._Builder |
clearIncludes()
Clear the
includes field. |
ProgramType._Builder |
clearNamespaces()
Clear the
namespaces field. |
ProgramType._Builder |
clearProgramName()
Clear the
program_name field. |
PStructDescriptor<ProgramType,ProgramType._Field> |
descriptor() |
boolean |
equals(Object o) |
String |
getDocumentation()
Program documentation must come before the first statement of the header.
|
String |
getProgramName()
The program name, deducted from the .thrift IDL file name.
|
int |
hashCode() |
boolean |
isModified(int key) |
boolean |
isModifiedDecl()
Checks if the
decl 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 |
isModifiedIncludes()
Checks if the
includes field has been modified since the
builder was created. |
boolean |
isModifiedNamespaces()
Checks if the
namespaces field has been modified since the
builder was created. |
boolean |
isModifiedProgramName()
Checks if the
program_name field has been modified since the
builder was created. |
boolean |
isSet(int key) |
boolean |
isSetDecl()
Checks for presence of the
decl field. |
boolean |
isSetDocumentation()
Checks for presence of the
documentation field. |
boolean |
isSetIncludes()
Checks for presence of the
includes field. |
boolean |
isSetNamespaces()
Checks for presence of the
namespaces field. |
boolean |
isSetProgramName()
Checks for presence of the
program_name field. |
ProgramType._Builder |
merge(ProgramType from) |
List<Declaration> |
mutableDecl()
Get the builder for the contained
decl message field. |
List<String> |
mutableIncludes()
Get the builder for the contained
includes message field. |
Map<String,String> |
mutableNamespaces()
Get the builder for the contained
namespaces message field. |
PMessageBuilder |
mutator(int key) |
ProgramType._Builder |
putInNamespaces(String key,
String value)
Adds a mapping to the
namespaces map. |
void |
readBinary(net.morimekta.util.io.BigEndianBinaryReader reader,
boolean strict) |
ProgramType._Builder |
set(int key,
Object value) |
ProgramType._Builder |
setDecl(Collection<Declaration> value)
Set the
decl field value. |
ProgramType._Builder |
setDocumentation(String value)
Set the
documentation field value. |
ProgramType._Builder |
setIncludes(Collection<String> value)
Set the
includes field value. |
ProgramType._Builder |
setNamespaces(Map<String,String> value)
Set the
namespaces field value. |
ProgramType._Builder |
setProgramName(String value)
Set the
program_name field value. |
boolean |
valid() |
void |
validate() |
addTo, clear, isModified, isSet, modifiedFields, mutator, presentFields, setpublic _Builder()
public _Builder(ProgramType base)
base - The base ProgramType@Nonnull public ProgramType._Builder merge(ProgramType from)
merge in class PMessageBuilder<ProgramType,ProgramType._Field>@Nonnull public ProgramType._Builder setDocumentation(String value)
documentation field value.
Program documentation must come before the first statement of the header.
value - The new valuepublic boolean isSetDocumentation()
documentation field.public boolean isModifiedDocumentation()
documentation field has been modified since the
builder was created.@Nonnull public ProgramType._Builder clearDocumentation()
documentation field.public String getDocumentation()
documentation field value@Nonnull public ProgramType._Builder setProgramName(String value)
program_name field value.
The program name, deducted from the .thrift IDL file name.
value - The new valuepublic boolean isSetProgramName()
program_name field.public boolean isModifiedProgramName()
program_name field has been modified since the
builder was created.@Nonnull public ProgramType._Builder clearProgramName()
program_name field.public String getProgramName()
program_name field value@Nonnull public ProgramType._Builder setIncludes(Collection<String> value)
includes field value.
List of included thrift files. Same as from the actual thrift file.
include "<program>.thrift"
value - The new value@Nonnull public ProgramType._Builder addToIncludes(String... values)
includes list.
List of included thrift files. Same as from the actual thrift file.
include "<program>.thrift"
values - The added valuepublic boolean isSetIncludes()
includes field.public boolean isModifiedIncludes()
includes field has been modified since the
builder was created.@Nonnull public ProgramType._Builder clearIncludes()
includes field.@Nonnull public List<String> mutableIncludes()
includes message field.
List of included thrift files. Same as from the actual thrift file.
include "<program>.thrift"
@Nonnull public ProgramType._Builder setNamespaces(Map<String,String> value)
namespaces field value.
Map of language to laguage dependent namespace identifier.
namespace <key> <value>
value - The new value@Nonnull public ProgramType._Builder putInNamespaces(String key, String value)
namespaces map.
Map of language to laguage dependent namespace identifier.
namespace <key> <value>
key - The inserted keyvalue - The inserted valuepublic boolean isSetNamespaces()
namespaces field.public boolean isModifiedNamespaces()
namespaces field has been modified since the
builder was created.@Nonnull public ProgramType._Builder clearNamespaces()
namespaces field.@Nonnull public Map<String,String> mutableNamespaces()
namespaces message field.
Map of language to laguage dependent namespace identifier.
namespace <key> <value>
@Nonnull public ProgramType._Builder setDecl(Collection<Declaration> value)
decl field value.
List of declarations in the program file. Same order as in the thrift file.
value - The new value@Nonnull public ProgramType._Builder addToDecl(Declaration... values)
decl list.
List of declarations in the program file. Same order as in the thrift file.
values - The added valuepublic boolean isSetDecl()
decl field.public boolean isModifiedDecl()
decl field has been modified since the
builder was created.@Nonnull public ProgramType._Builder clearDecl()
decl field.@Nonnull public List<Declaration> mutableDecl()
decl message field.
List of declarations in the program file. Same order as in the thrift file.
public PMessageBuilder mutator(int key)
mutator in class PMessageBuilder<ProgramType,ProgramType._Field>@Nonnull public ProgramType._Builder set(int key, Object value)
set in class PMessageBuilder<ProgramType,ProgramType._Field>public boolean isSet(int key)
isSet in class PMessageBuilder<ProgramType,ProgramType._Field>public boolean isModified(int key)
isModified in class PMessageBuilder<ProgramType,ProgramType._Field>public ProgramType._Builder addTo(int key, Object value)
addTo in class PMessageBuilder<ProgramType,ProgramType._Field>@Nonnull public ProgramType._Builder clear(int key)
clear in class PMessageBuilder<ProgramType,ProgramType._Field>public boolean valid()
valid in class PMessageBuilder<ProgramType,ProgramType._Field>public void validate()
validate in class PMessageBuilder<ProgramType,ProgramType._Field>@Nonnull public PStructDescriptor<ProgramType,ProgramType._Field> descriptor()
descriptor in class PMessageBuilder<ProgramType,ProgramType._Field>public void readBinary(net.morimekta.util.io.BigEndianBinaryReader reader,
boolean strict)
throws IOException
readBinary in interface BinaryReaderIOExceptionpublic ProgramType build()
build in interface PBuilder<ProgramType>Copyright © 2015–2018 morimekta.net. All rights reserved.