Class MessageType._Builder

    • Constructor Detail

      • _Builder

        public _Builder()
        Make a p_model.MessageType builder instance.
      • _Builder

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

      • setDocumentation

        @Nonnull
        public MessageType._Builder setDocumentation​(java.lang.String value)
        Set the documentation field value.
        Specified by:
        setDocumentation in interface Decl._Builder
        Parameters:
        value - The new value
        Returns:
        The builder
      • isSetDocumentation

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

        public boolean hasDocumentation()
        Checks for presence of the documentation field.
        Specified by:
        hasDocumentation in interface Decl
        Returns:
        True if documentation is present.
      • isModifiedDocumentation

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

        public java.lang.String getDocumentation()
        Description copied from interface: Decl
        Documentation for the specific declaration.
        Specified by:
        getDocumentation in interface Decl
        Returns:
        The documentation field value
      • optionalDocumentation

        @Nonnull
        public java.util.Optional<java.lang.String> optionalDocumentation()
        Description copied from interface: Decl
        Documentation for the specific declaration.
        Specified by:
        optionalDocumentation in interface Decl
        Returns:
        Optional documentation field value
      • setVariant

        @Nonnull
        public MessageType._Builder setVariant​(MessageVariant value)
        Set the variant field value.
        Parameters:
        value - The new value
        Returns:
        The builder
      • isSetVariant

        public boolean isSetVariant()
        Checks for explicit presence of the variant field.
        Returns:
        True if variant has been set.
      • hasVariant

        public boolean hasVariant()
        Checks for presence of the variant field.
        Specified by:
        hasVariant in interface MessageType_OrBuilder
        Returns:
        True if variant is present.
      • isModifiedVariant

        public boolean isModifiedVariant()
        Checks if the variant field has been modified since the builder was created.
        Returns:
        True if variant has been modified.
      • clearVariant

        @Nonnull
        public MessageType._Builder clearVariant()
        Clear the variant field.
        Returns:
        The builder
      • setName

        @Nonnull
        public MessageType._Builder setName​(java.lang.String value)
        Set the name field value.
        Specified by:
        setName in interface Decl._Builder
        Parameters:
        value - The new value
        Returns:
        The builder
      • isSetName

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

        public boolean hasName()
        Checks for presence of the name field.
        Specified by:
        hasName in interface Decl
        Returns:
        True if name is present.
      • isModifiedName

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

        public java.lang.String getName()
        Description copied from interface: Decl
        Name of the type, constant or service.
        Specified by:
        getName in interface Decl
        Returns:
        The name field value
      • setFields

        @Nonnull
        public MessageType._Builder setFields​(java.util.Collection<FieldType> value)
        Set the fields field value.
        Parameters:
        value - The new value
        Returns:
        The builder
      • addToFields

        @Nonnull
        public MessageType._Builder addToFields​(FieldType... values)
        Adds entries to the fields list.
        Parameters:
        values - The added value
        Returns:
        The builder
      • isSetFields

        public boolean isSetFields()
        Checks for explicit presence of the fields field.
        Returns:
        True if fields has been set.
      • hasFields

        public boolean hasFields()
        Checks for presence of the fields field.
        Specified by:
        hasFields in interface MessageType_OrBuilder
        Returns:
        True if fields is present.
      • isModifiedFields

        public boolean isModifiedFields()
        Checks if the fields field has been modified since the builder was created.
        Returns:
        True if fields has been modified.
      • clearFields

        @Nonnull
        public MessageType._Builder clearFields()
        Clear the fields field.
        Returns:
        The builder
      • mutableFields

        public java.util.List<FieldType> mutableFields()
        Returns:
        The mutable fields container
      • setAnnotations

        @Nonnull
        public MessageType._Builder setAnnotations​(java.util.Map<java.lang.String,​java.lang.String> value)
        Set the annotations field value.
        Parameters:
        value - The new value
        Returns:
        The builder
      • putInAnnotations

        @Nonnull
        public MessageType._Builder putInAnnotations​(java.lang.String key,
                                                     java.lang.String value)
        Adds a mapping to the annotations map.
        Parameters:
        key - The inserted key
        value - The inserted value
        Returns:
        The builder
      • isSetAnnotations

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

        public boolean hasAnnotations()
        Checks for presence of the annotations field.
        Specified by:
        hasAnnotations in interface MessageType_OrBuilder
        Returns:
        True if annotations is present.
      • isModifiedAnnotations

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

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

        public java.util.Map<java.lang.String,​java.lang.String> mutableAnnotations()
        Returns:
        The mutable annotations container
      • getAnnotations

        public java.util.Map<java.lang.String,​java.lang.String> getAnnotations()
        Specified by:
        getAnnotations in interface MessageType_OrBuilder
        Returns:
        The annotations field value
      • optionalAnnotations

        @Nonnull
        public java.util.Optional<java.util.Map<java.lang.String,​java.lang.String>> optionalAnnotations()
        Specified by:
        optionalAnnotations in interface MessageType_OrBuilder
        Returns:
        Optional annotations field value
      • setImplementing

        @Nonnull
        public MessageType._Builder setImplementing​(java.lang.String value)
        Set the implementing field value.

        Interface this message is implementing.

        Parameters:
        value - The new value
        Returns:
        The builder
      • isSetImplementing

        public boolean isSetImplementing()
        Checks for explicit presence of the implementing field.
        Returns:
        True if implementing has been set.
      • hasImplementing

        public boolean hasImplementing()
        Checks for presence of the implementing field.
        Specified by:
        hasImplementing in interface MessageType_OrBuilder
        Returns:
        True if implementing is present.
      • isModifiedImplementing

        public boolean isModifiedImplementing()
        Checks if the implementing field has been modified since the builder was created.
        Returns:
        True if implementing has been modified.
      • clearImplementing

        @Nonnull
        public MessageType._Builder clearImplementing()
        Clear the implementing field.
        Returns:
        The builder
      • getImplementing

        public java.lang.String getImplementing()
        Interface this message is implementing.
        Specified by:
        getImplementing in interface MessageType_OrBuilder
        Returns:
        The implementing field value
      • optionalImplementing

        @Nonnull
        public java.util.Optional<java.lang.String> optionalImplementing()
        Interface this message is implementing.
        Specified by:
        optionalImplementing in interface MessageType_OrBuilder
        Returns:
        Optional implementing 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<MessageType>
      • set

        @Nonnull
        public MessageType._Builder set​(int key,
                                        java.lang.Object value)
        Specified by:
        set in class net.morimekta.providence.PMessageBuilder<MessageType>
      • isSet

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

        public boolean isModified​(int key)
        Specified by:
        isModified in class net.morimekta.providence.PMessageBuilder<MessageType>
      • get

        public <T> T get​(int key)
        Specified by:
        get in interface net.morimekta.providence.PMessageOrBuilder<MessageType>
      • has

        public boolean has​(int key)
        Specified by:
        has in interface net.morimekta.providence.PMessageOrBuilder<MessageType>
      • addTo

        @Nonnull
        public MessageType._Builder addTo​(int key,
                                          java.lang.Object value)
        Specified by:
        addTo in class net.morimekta.providence.PMessageBuilder<MessageType>
      • valid

        public boolean valid()
        Specified by:
        valid in class net.morimekta.providence.PMessageBuilder<MessageType>
      • descriptor

        @Nonnull
        public net.morimekta.providence.descriptor.PStructDescriptor<MessageType> descriptor()
        Specified by:
        descriptor in interface net.morimekta.providence.PMessageOrBuilder<MessageType>
        Specified by:
        descriptor in interface net.morimekta.providence.PValue<MessageType>
      • 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

        @Nonnull
        public MessageType build()
        Specified by:
        build in interface Decl._Builder
        Specified by:
        build in class net.morimekta.providence.PMessageBuilder<MessageType>
        Returns:
        The built instance