Class Declaration._Builder

  • All Implemented Interfaces:
    Declaration_OrBuilder, net.morimekta.providence.PMessageOrBuilder<Declaration>, net.morimekta.providence.PValue<Declaration>, net.morimekta.providence.serializer.binary.BinaryReader
    Enclosing class:
    Declaration

    public static class Declaration._Builder
    extends net.morimekta.providence.PMessageBuilder<Declaration>
    implements Declaration_OrBuilder, net.morimekta.providence.serializer.binary.BinaryReader
    ( <enum> | <typedef> | <struct> | <service> | <const> )
    • Constructor Detail

      • _Builder

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

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

      • isSetDeclEnum

        public boolean isSetDeclEnum()
        Checks for explicit presence of the decl_enum field.
        Returns:
        True if decl_enum has been set.
      • hasDeclEnum

        public boolean hasDeclEnum()
        Checks for presence of the decl_enum field.
        Specified by:
        hasDeclEnum in interface Declaration_OrBuilder
        Returns:
        True if decl_enum is present.
      • clearDeclEnum

        @Nonnull
        public Declaration._Builder clearDeclEnum()
        Clear the decl_enum field.
        Returns:
        The builder
      • mutableDeclEnum

        @Nonnull
        public EnumType._Builder mutableDeclEnum()
        Get the builder for the contained decl_enum message field.
        Returns:
        The field message builder
      • isSetDeclTypedef

        public boolean isSetDeclTypedef()
        Checks for explicit presence of the decl_typedef field.
        Returns:
        True if decl_typedef has been set.
      • hasDeclTypedef

        public boolean hasDeclTypedef()
        Checks for presence of the decl_typedef field.
        Specified by:
        hasDeclTypedef in interface Declaration_OrBuilder
        Returns:
        True if decl_typedef is present.
      • clearDeclTypedef

        @Nonnull
        public Declaration._Builder clearDeclTypedef()
        Clear the decl_typedef field.
        Returns:
        The builder
      • mutableDeclTypedef

        @Nonnull
        public TypedefType._Builder mutableDeclTypedef()
        Get the builder for the contained decl_typedef message field.
        Returns:
        The field message builder
      • isSetDeclMessage

        public boolean isSetDeclMessage()
        Checks for explicit presence of the decl_message field.
        Returns:
        True if decl_message has been set.
      • hasDeclMessage

        public boolean hasDeclMessage()
        Checks for presence of the decl_message field.
        Specified by:
        hasDeclMessage in interface Declaration_OrBuilder
        Returns:
        True if decl_message is present.
      • clearDeclMessage

        @Nonnull
        public Declaration._Builder clearDeclMessage()
        Clear the decl_message field.
        Returns:
        The builder
      • mutableDeclMessage

        @Nonnull
        public MessageType._Builder mutableDeclMessage()
        Get the builder for the contained decl_message message field.
        Returns:
        The field message builder
      • isSetDeclService

        public boolean isSetDeclService()
        Checks for explicit presence of the decl_service field.
        Returns:
        True if decl_service has been set.
      • hasDeclService

        public boolean hasDeclService()
        Checks for presence of the decl_service field.
        Specified by:
        hasDeclService in interface Declaration_OrBuilder
        Returns:
        True if decl_service is present.
      • clearDeclService

        @Nonnull
        public Declaration._Builder clearDeclService()
        Clear the decl_service field.
        Returns:
        The builder
      • mutableDeclService

        @Nonnull
        public ServiceType._Builder mutableDeclService()
        Get the builder for the contained decl_service message field.
        Returns:
        The field message builder
      • isSetDeclConst

        public boolean isSetDeclConst()
        Checks for explicit presence of the decl_const field.
        Returns:
        True if decl_const has been set.
      • hasDeclConst

        public boolean hasDeclConst()
        Checks for presence of the decl_const field.
        Specified by:
        hasDeclConst in interface Declaration_OrBuilder
        Returns:
        True if decl_const is present.
      • clearDeclConst

        @Nonnull
        public Declaration._Builder clearDeclConst()
        Clear the decl_const field.
        Returns:
        The builder
      • mutableDeclConst

        @Nonnull
        public ConstType._Builder mutableDeclConst()
        Get the builder for the contained decl_const message field.
        Returns:
        The field message builder
      • isUnionModified

        public boolean isUnionModified()
        Checks if the Declaration union has been modified since the builder was created.
        Returns:
        True if Declaration has been modified.
      • 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<Declaration>
      • set

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

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

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

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

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

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

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

        @Nonnull
        public net.morimekta.providence.descriptor.PUnionDescriptor<Declaration> descriptor()
        Specified by:
        descriptor in interface net.morimekta.providence.PMessageOrBuilder<Declaration>
        Specified by:
        descriptor in interface net.morimekta.providence.PValue<Declaration>
      • 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 Declaration build()
        Specified by:
        build in class net.morimekta.providence.PMessageBuilder<Declaration>