Package net.morimekta.providence.model
Class ConstType._Builder
- java.lang.Object
-
- net.morimekta.providence.PMessageBuilder<ConstType,ConstType._Field>
-
- net.morimekta.providence.model.ConstType._Builder
-
- All Implemented Interfaces:
net.morimekta.providence.PBuilder<ConstType>,net.morimekta.providence.serializer.binary.BinaryReader
- Enclosing class:
- ConstType
public static class ConstType._Builder extends net.morimekta.providence.PMessageBuilder<ConstType,ConstType._Field> implements net.morimekta.providence.serializer.binary.BinaryReader
const <type> <name> = <value>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConstType._BuilderaddTo(int key, java.lang.Object value)ConstTypebuild()ConstType._Builderclear(int key)ConstType._BuilderclearAnnotations()Clear theannotationsfield.ConstType._BuilderclearDocumentation()Clear thedocumentationfield.ConstType._BuilderclearEndPos()Clear theend_posfield.ConstType._BuilderclearName()Clear thenamefield.ConstType._BuilderclearStartPos()Clear thestart_posfield.ConstType._BuilderclearType()Clear thetypefield.ConstType._BuilderclearValue()Clear thevaluefield.ConstType._BuilderclearValueStartPos()Clear thevalue_start_posfield.net.morimekta.providence.descriptor.PStructDescriptor<ConstType,ConstType._Field>descriptor()booleanequals(java.lang.Object o)java.lang.StringgetDocumentation()FilePosgetEndPos()The end of the definition (position of '}')java.lang.StringgetName()FilePosgetStartPos()The start of the definition (position of 'enum')java.lang.StringgetType()java.lang.StringgetValue()FilePosgetValueStartPos()Note the start of the const in the parsed thrift file, this can be used for making more accurate exception / parse data from the const parser.inthashCode()booleanisModified(int key)booleanisModifiedAnnotations()Checks if theannotationsfield has been modified since the builder was created.booleanisModifiedDocumentation()Checks if thedocumentationfield has been modified since the builder was created.booleanisModifiedEndPos()Checks if theend_posfield has been modified since the builder was created.booleanisModifiedName()Checks if thenamefield has been modified since the builder was created.booleanisModifiedStartPos()Checks if thestart_posfield has been modified since the builder was created.booleanisModifiedType()Checks if thetypefield has been modified since the builder was created.booleanisModifiedValue()Checks if thevaluefield has been modified since the builder was created.booleanisModifiedValueStartPos()Checks if thevalue_start_posfield has been modified since the builder was created.booleanisSet(int key)booleanisSetAnnotations()Checks for presence of theannotationsfield.booleanisSetDocumentation()Checks for presence of thedocumentationfield.booleanisSetEndPos()Checks for presence of theend_posfield.booleanisSetName()Checks for presence of thenamefield.booleanisSetStartPos()Checks for presence of thestart_posfield.booleanisSetType()Checks for presence of thetypefield.booleanisSetValue()Checks for presence of thevaluefield.booleanisSetValueStartPos()Checks for presence of thevalue_start_posfield.ConstType._Buildermerge(ConstType from)java.util.Map<java.lang.String,java.lang.String>mutableAnnotations()FilePos._BuildermutableEndPos()Get the builder for the containedend_posmessage field.FilePos._BuildermutableStartPos()Get the builder for the containedstart_posmessage field.FilePos._BuildermutableValueStartPos()Get the builder for the containedvalue_start_posmessage field.net.morimekta.providence.PMessageBuildermutator(int key)ConstType._BuilderputInAnnotations(java.lang.String key, java.lang.String value)Adds a mapping to theannotationsmap.voidreadBinary(net.morimekta.util.io.BigEndianBinaryReader reader, boolean strict)ConstType._Builderset(int key, java.lang.Object value)ConstType._BuildersetAnnotations(java.util.Map<java.lang.String,java.lang.String> value)Set theannotationsfield value.ConstType._BuildersetDocumentation(java.lang.String value)Set thedocumentationfield value.ConstType._BuildersetEndPos(FilePos value)Set theend_posfield value.ConstType._BuildersetEndPos(FilePos._Builder builder)Set theend_posfield value.ConstType._BuildersetName(java.lang.String value)Set thenamefield value.ConstType._BuildersetStartPos(FilePos value)Set thestart_posfield value.ConstType._BuildersetStartPos(FilePos._Builder builder)Set thestart_posfield value.ConstType._BuildersetType(java.lang.String value)Set thetypefield value.ConstType._BuildersetValue(java.lang.String value)Set thevaluefield value.ConstType._BuildersetValueStartPos(FilePos value)Set thevalue_start_posfield value.ConstType._BuildersetValueStartPos(FilePos._Builder builder)Set thevalue_start_posfield value.booleanvalid()voidvalidate()
-
-
-
Constructor Detail
-
_Builder
public _Builder()
Make a pmodel.ConstType builder instance.
-
_Builder
public _Builder(ConstType base)
Make a mutating builder off a base pmodel.ConstType.- Parameters:
base- The base ConstType
-
-
Method Detail
-
merge
@Nonnull public ConstType._Builder merge(ConstType from)
- Specified by:
mergein classnet.morimekta.providence.PMessageBuilder<ConstType,ConstType._Field>
-
setDocumentation
@Nonnull public ConstType._Builder setDocumentation(java.lang.String value)
Set thedocumentationfield value.- Parameters:
value- The new value- Returns:
- The builder
-
isSetDocumentation
public boolean isSetDocumentation()
Checks for presence of thedocumentationfield.- Returns:
- True if documentation has been set.
-
isModifiedDocumentation
public boolean isModifiedDocumentation()
Checks if thedocumentationfield has been modified since the builder was created.- Returns:
- True if documentation has been modified.
-
clearDocumentation
@Nonnull public ConstType._Builder clearDocumentation()
Clear thedocumentationfield.- Returns:
- The builder
-
getDocumentation
public java.lang.String getDocumentation()
- Returns:
- The
documentationfield value
-
setType
@Nonnull public ConstType._Builder setType(java.lang.String value)
Set thetypefield value.- Parameters:
value- The new value- Returns:
- The builder
-
isSetType
public boolean isSetType()
Checks for presence of thetypefield.- Returns:
- True if type has been set.
-
isModifiedType
public boolean isModifiedType()
Checks if thetypefield has been modified since the builder was created.- Returns:
- True if type has been modified.
-
clearType
@Nonnull public ConstType._Builder clearType()
Clear thetypefield.- Returns:
- The builder
-
getType
public java.lang.String getType()
- Returns:
- The
typefield value
-
setName
@Nonnull public ConstType._Builder setName(java.lang.String value)
Set thenamefield value.- Parameters:
value- The new value- Returns:
- The builder
-
isSetName
public boolean isSetName()
Checks for presence of thenamefield.- Returns:
- True if name has been set.
-
isModifiedName
public boolean isModifiedName()
Checks if thenamefield has been modified since the builder was created.- Returns:
- True if name has been modified.
-
clearName
@Nonnull public ConstType._Builder clearName()
Clear thenamefield.- Returns:
- The builder
-
getName
public java.lang.String getName()
- Returns:
- The
namefield value
-
setValue
@Nonnull public ConstType._Builder setValue(java.lang.String value)
Set thevaluefield value.- Parameters:
value- The new value- Returns:
- The builder
-
isSetValue
public boolean isSetValue()
Checks for presence of thevaluefield.- Returns:
- True if value has been set.
-
isModifiedValue
public boolean isModifiedValue()
Checks if thevaluefield has been modified since the builder was created.- Returns:
- True if value has been modified.
-
clearValue
@Nonnull public ConstType._Builder clearValue()
Clear thevaluefield.- Returns:
- The builder
-
getValue
public java.lang.String getValue()
- Returns:
- The
valuefield value
-
setAnnotations
@Nonnull public ConstType._Builder setAnnotations(java.util.Map<java.lang.String,java.lang.String> value)
Set theannotationsfield value.- Parameters:
value- The new value- Returns:
- The builder
-
putInAnnotations
@Nonnull public ConstType._Builder putInAnnotations(java.lang.String key, java.lang.String value)
Adds a mapping to theannotationsmap.- Parameters:
key- The inserted keyvalue- The inserted value- Returns:
- The builder
-
isSetAnnotations
public boolean isSetAnnotations()
Checks for presence of theannotationsfield.- Returns:
- True if annotations has been set.
-
isModifiedAnnotations
public boolean isModifiedAnnotations()
Checks if theannotationsfield has been modified since the builder was created.- Returns:
- True if annotations has been modified.
-
clearAnnotations
@Nonnull public ConstType._Builder clearAnnotations()
Clear theannotationsfield.- Returns:
- The builder
-
mutableAnnotations
public java.util.Map<java.lang.String,java.lang.String> mutableAnnotations()
- Returns:
- The mutable
annotationscontainer
-
setValueStartPos
@Nonnull public ConstType._Builder setValueStartPos(FilePos value)
Set thevalue_start_posfield value.Note the start of the const in the parsed thrift file, this can be used for making more accurate exception / parse data from the const parser.
- Parameters:
value- The new value- Returns:
- The builder
-
setValueStartPos
@Nonnull public ConstType._Builder setValueStartPos(FilePos._Builder builder)
Set thevalue_start_posfield value.Note the start of the const in the parsed thrift file, this can be used for making more accurate exception / parse data from the const parser.
- Parameters:
builder- builder for the new value- Returns:
- The builder
-
isSetValueStartPos
public boolean isSetValueStartPos()
Checks for presence of thevalue_start_posfield.- Returns:
- True if value_start_pos has been set.
-
isModifiedValueStartPos
public boolean isModifiedValueStartPos()
Checks if thevalue_start_posfield has been modified since the builder was created.- Returns:
- True if value_start_pos has been modified.
-
clearValueStartPos
@Nonnull public ConstType._Builder clearValueStartPos()
Clear thevalue_start_posfield.- Returns:
- The builder
-
mutableValueStartPos
@Nonnull public FilePos._Builder mutableValueStartPos()
Get the builder for the containedvalue_start_posmessage field.Note the start of the const in the parsed thrift file, this can be used for making more accurate exception / parse data from the const parser.
- Returns:
- The field message builder
-
getValueStartPos
public FilePos getValueStartPos()
Note the start of the const in the parsed thrift file, this can be used for making more accurate exception / parse data from the const parser.- Returns:
- The field value
-
setStartPos
@Nonnull public ConstType._Builder setStartPos(FilePos value)
Set thestart_posfield value.The start of the definition (position of 'enum')
- Parameters:
value- The new value- Returns:
- The builder
-
setStartPos
@Nonnull public ConstType._Builder setStartPos(FilePos._Builder builder)
Set thestart_posfield value.The start of the definition (position of 'enum')
- Parameters:
builder- builder for the new value- Returns:
- The builder
-
isSetStartPos
public boolean isSetStartPos()
Checks for presence of thestart_posfield.- Returns:
- True if start_pos has been set.
-
isModifiedStartPos
public boolean isModifiedStartPos()
Checks if thestart_posfield has been modified since the builder was created.- Returns:
- True if start_pos has been modified.
-
clearStartPos
@Nonnull public ConstType._Builder clearStartPos()
Clear thestart_posfield.- Returns:
- The builder
-
mutableStartPos
@Nonnull public FilePos._Builder mutableStartPos()
Get the builder for the containedstart_posmessage field.The start of the definition (position of 'enum')
- Returns:
- The field message builder
-
getStartPos
public FilePos getStartPos()
The start of the definition (position of 'enum')- Returns:
- The field value
-
setEndPos
@Nonnull public ConstType._Builder setEndPos(FilePos value)
Set theend_posfield value.The end of the definition (position of '}')
- Parameters:
value- The new value- Returns:
- The builder
-
setEndPos
@Nonnull public ConstType._Builder setEndPos(FilePos._Builder builder)
Set theend_posfield value.The end of the definition (position of '}')
- Parameters:
builder- builder for the new value- Returns:
- The builder
-
isSetEndPos
public boolean isSetEndPos()
Checks for presence of theend_posfield.- Returns:
- True if end_pos has been set.
-
isModifiedEndPos
public boolean isModifiedEndPos()
Checks if theend_posfield has been modified since the builder was created.- Returns:
- True if end_pos has been modified.
-
clearEndPos
@Nonnull public ConstType._Builder clearEndPos()
Clear theend_posfield.- Returns:
- The builder
-
mutableEndPos
@Nonnull public FilePos._Builder mutableEndPos()
Get the builder for the containedend_posmessage field.The end of the definition (position of '}')
- Returns:
- The field message builder
-
getEndPos
public FilePos getEndPos()
The end of the definition (position of '}')- Returns:
- The field value
-
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<ConstType,ConstType._Field>
-
set
@Nonnull public ConstType._Builder set(int key, java.lang.Object value)
- Specified by:
setin classnet.morimekta.providence.PMessageBuilder<ConstType,ConstType._Field>
-
isSet
public boolean isSet(int key)
- Specified by:
isSetin classnet.morimekta.providence.PMessageBuilder<ConstType,ConstType._Field>
-
isModified
public boolean isModified(int key)
- Specified by:
isModifiedin classnet.morimekta.providence.PMessageBuilder<ConstType,ConstType._Field>
-
addTo
@Nonnull public ConstType._Builder addTo(int key, java.lang.Object value)
- Specified by:
addToin classnet.morimekta.providence.PMessageBuilder<ConstType,ConstType._Field>
-
clear
@Nonnull public ConstType._Builder clear(int key)
- Specified by:
clearin classnet.morimekta.providence.PMessageBuilder<ConstType,ConstType._Field>
-
valid
public boolean valid()
- Specified by:
validin classnet.morimekta.providence.PMessageBuilder<ConstType,ConstType._Field>
-
validate
public void validate()
- Specified by:
validatein classnet.morimekta.providence.PMessageBuilder<ConstType,ConstType._Field>
-
descriptor
@Nonnull public net.morimekta.providence.descriptor.PStructDescriptor<ConstType,ConstType._Field> descriptor()
- Specified by:
descriptorin classnet.morimekta.providence.PMessageBuilder<ConstType,ConstType._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
-
-