Class 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>
    • Constructor Detail

      • _Builder

        public _Builder()
        Make a providence_model.ConstType builder.
      • _Builder

        public _Builder​(ConstType base)
        Make a mutating builder off a base providence_model.ConstType.
        Parameters:
        base - The base ConstType
    • Method Detail

      • setDocumentation

        @Nonnull
        public ConstType._Builder setDocumentation​(java.lang.String value)
        Sets the value of documentation.
        Parameters:
        value - The new value
        Returns:
        The builder
      • isSetDocumentation

        public boolean isSetDocumentation()
        Checks for presence of the documentation field.
        Returns:
        True if documentation has been set.
      • isModifiedDocumentation

        public boolean isModifiedDocumentation()
        Checks if documentation has been modified since the _Builder was created.
        Returns:
        True if documentation has been modified.
      • clearDocumentation

        @Nonnull
        public ConstType._Builder clearDocumentation()
        Clears the documentation field.
        Returns:
        The builder
      • getDocumentation

        public java.lang.String getDocumentation()
        Gets the value of the contained documentation.
        Returns:
        The field value
      • setType

        @Nonnull
        public ConstType._Builder setType​(java.lang.String value)
        Sets the value of type.
        Parameters:
        value - The new value
        Returns:
        The builder
      • isSetType

        public boolean isSetType()
        Checks for presence of the type field.
        Returns:
        True if type has been set.
      • isModifiedType

        public boolean isModifiedType()
        Checks if type has been modified since the _Builder was created.
        Returns:
        True if type has been modified.
      • clearType

        @Nonnull
        public ConstType._Builder clearType()
        Clears the type field.
        Returns:
        The builder
      • getType

        public java.lang.String getType()
        Gets the value of the contained type.
        Returns:
        The field value
      • setName

        @Nonnull
        public ConstType._Builder setName​(java.lang.String value)
        Sets the value of name.
        Parameters:
        value - The new value
        Returns:
        The builder
      • isSetName

        public boolean isSetName()
        Checks for presence of the name field.
        Returns:
        True if name has been set.
      • isModifiedName

        public boolean isModifiedName()
        Checks if name has been modified since the _Builder was created.
        Returns:
        True if name has been modified.
      • clearName

        @Nonnull
        public ConstType._Builder clearName()
        Clears the name field.
        Returns:
        The builder
      • getName

        public java.lang.String getName()
        Gets the value of the contained name.
        Returns:
        The field value
      • setValue

        @Nonnull
        public ConstType._Builder setValue​(java.lang.String value)
        Sets the value of value.
        Parameters:
        value - The new value
        Returns:
        The builder
      • isSetValue

        public boolean isSetValue()
        Checks for presence of the value field.
        Returns:
        True if value has been set.
      • isModifiedValue

        public boolean isModifiedValue()
        Checks if value has been modified since the _Builder was created.
        Returns:
        True if value has been modified.
      • clearValue

        @Nonnull
        public ConstType._Builder clearValue()
        Clears the value field.
        Returns:
        The builder
      • getValue

        public java.lang.String getValue()
        Gets the value of the contained value.
        Returns:
        The field value
      • setAnnotations

        @Nonnull
        public ConstType._Builder setAnnotations​(java.util.Map<java.lang.String,java.lang.String> value)
        Sets the value of annotations.
        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 annotations.
        Parameters:
        key - The inserted key
        value - The inserted value
        Returns:
        The builder
      • isSetAnnotations

        public boolean isSetAnnotations()
        Checks for presence of the annotations field.
        Returns:
        True if annotations has been set.
      • isModifiedAnnotations

        public boolean isModifiedAnnotations()
        Checks if annotations has been modified since the _Builder was created.
        Returns:
        True if annotations has been modified.
      • clearAnnotations

        @Nonnull
        public ConstType._Builder clearAnnotations()
        Clears the annotations field.
        Returns:
        The builder
      • mutableAnnotations

        @Nonnull
        public java.util.Map<java.lang.String,java.lang.String> mutableAnnotations()
        Gets the builder for the contained annotations.
        Returns:
        The field builder
      • setStartLineNo

        @Nonnull
        public ConstType._Builder setStartLineNo​(int 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
      • isSetStartLineNo

        public boolean isSetStartLineNo()
        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:
        True if start_line_no has been set.
      • isModifiedStartLineNo

        public boolean isModifiedStartLineNo()
        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:
        True if start_line_no has been modified.
      • clearStartLineNo

        @Nonnull
        public ConstType._Builder clearStartLineNo()
        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 builder
      • getStartLineNo

        public int getStartLineNo()
        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
      • setStartLinePos

        @Nonnull
        public ConstType._Builder setStartLinePos​(int value)
        Sets the value of start_line_pos.
        Parameters:
        value - The new value
        Returns:
        The builder
      • isSetStartLinePos

        public boolean isSetStartLinePos()
        Checks for presence of the start_line_pos field.
        Returns:
        True if start_line_pos has been set.
      • isModifiedStartLinePos

        public boolean isModifiedStartLinePos()
        Checks if start_line_pos has been modified since the _Builder was created.
        Returns:
        True if start_line_pos has been modified.
      • clearStartLinePos

        @Nonnull
        public ConstType._Builder clearStartLinePos()
        Clears the start_line_pos field.
        Returns:
        The builder
      • getStartLinePos

        public int getStartLinePos()
        Gets the value of the contained start_line_pos.
        Returns:
        The field value
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • mutator

        public net.morimekta.providence.PMessageBuilder mutator​(int key)
        Specified by:
        mutator in class net.morimekta.providence.PMessageBuilder<ConstType,ConstType._Field>
      • isSet

        public boolean isSet​(int key)
        Specified by:
        isSet in class net.morimekta.providence.PMessageBuilder<ConstType,ConstType._Field>
      • isModified

        public boolean isModified​(int key)
        Specified by:
        isModified in class net.morimekta.providence.PMessageBuilder<ConstType,ConstType._Field>
      • valid

        public boolean valid()
        Specified by:
        valid in class net.morimekta.providence.PMessageBuilder<ConstType,ConstType._Field>
      • validate

        public void validate()
        Specified by:
        validate in class net.morimekta.providence.PMessageBuilder<ConstType,ConstType._Field>
      • readBinary

        public void readBinary​(net.morimekta.util.io.BigEndianBinaryReader reader,
                               boolean strict)
                        throws java.io.IOException
        Specified by:
        readBinary in interface net.morimekta.providence.serializer.binary.BinaryReader
        Throws:
        java.io.IOException
      • build

        public ConstType build()
        Specified by:
        build in interface net.morimekta.providence.PBuilder<ConstType>