Class Declaration._Builder

    • Constructor Detail

      • _Builder

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

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

      • merge

        @Nonnull
        public Declaration._Builder merge​(Declaration from)
        Description copied from class: PMessageBuilder
        Merges the provided message into the builder. Contained messages should in turn be merged and not replaced wholesale. Sets are unioned (addAll) and maps will overwrite / replace on a per-key basis (putAll).
        Specified by:
        merge in class PMessageBuilder<Declaration,Declaration._Field>
        Parameters:
        from - The message to merge values from.
        Returns:
        The message builder.
      • setDeclEnum

        @Nonnull
        public Declaration._Builder setDeclEnum​(EnumType value)
        Sets the value of decl_enum.
        Parameters:
        value - The new value
        Returns:
        The builder
      • setDeclEnum

        @Nonnull
        public Declaration._Builder setDeclEnum​(EnumType._Builder builder)
        Sets the value of decl_enum.
        Parameters:
        builder - builder for the new value
        Returns:
        The builder
      • isSetDeclEnum

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

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

        @Nonnull
        public EnumType._Builder mutableDeclEnum()
        Gets the builder for the contained decl_enum.
        Returns:
        The field builder
      • getDeclEnum

        public EnumType getDeclEnum()
        Gets the value for the contained decl_enum.
        Returns:
        The field value
      • setDeclTypedef

        @Nonnull
        public Declaration._Builder setDeclTypedef​(TypedefType value)
        Sets the value of decl_typedef.
        Parameters:
        value - The new value
        Returns:
        The builder
      • setDeclTypedef

        @Nonnull
        public Declaration._Builder setDeclTypedef​(TypedefType._Builder builder)
        Sets the value of decl_typedef.
        Parameters:
        builder - builder for the new value
        Returns:
        The builder
      • isSetDeclTypedef

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

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

        @Nonnull
        public TypedefType._Builder mutableDeclTypedef()
        Gets the builder for the contained decl_typedef.
        Returns:
        The field builder
      • getDeclTypedef

        public TypedefType getDeclTypedef()
        Gets the value for the contained decl_typedef.
        Returns:
        The field value
      • setDeclMessage

        @Nonnull
        public Declaration._Builder setDeclMessage​(MessageType value)
        Sets the value of decl_message.
        Parameters:
        value - The new value
        Returns:
        The builder
      • setDeclMessage

        @Nonnull
        public Declaration._Builder setDeclMessage​(MessageType._Builder builder)
        Sets the value of decl_message.
        Parameters:
        builder - builder for the new value
        Returns:
        The builder
      • isSetDeclMessage

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

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

        @Nonnull
        public MessageType._Builder mutableDeclMessage()
        Gets the builder for the contained decl_message.
        Returns:
        The field builder
      • getDeclMessage

        public MessageType getDeclMessage()
        Gets the value for the contained decl_message.
        Returns:
        The field value
      • setDeclService

        @Nonnull
        public Declaration._Builder setDeclService​(ServiceType value)
        Sets the value of decl_service.
        Parameters:
        value - The new value
        Returns:
        The builder
      • setDeclService

        @Nonnull
        public Declaration._Builder setDeclService​(ServiceType._Builder builder)
        Sets the value of decl_service.
        Parameters:
        builder - builder for the new value
        Returns:
        The builder
      • isSetDeclService

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

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

        @Nonnull
        public ServiceType._Builder mutableDeclService()
        Gets the builder for the contained decl_service.
        Returns:
        The field builder
      • getDeclService

        public ServiceType getDeclService()
        Gets the value for the contained decl_service.
        Returns:
        The field value
      • setDeclConst

        @Nonnull
        public Declaration._Builder setDeclConst​(ConstType value)
        Sets the value of decl_const.
        Parameters:
        value - The new value
        Returns:
        The builder
      • setDeclConst

        @Nonnull
        public Declaration._Builder setDeclConst​(ConstType._Builder builder)
        Sets the value of decl_const.
        Parameters:
        builder - builder for the new value
        Returns:
        The builder
      • isSetDeclConst

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

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

        @Nonnull
        public ConstType._Builder mutableDeclConst()
        Gets the builder for the contained decl_const.
        Returns:
        The field builder
      • getDeclConst

        public ConstType getDeclConst()
        Gets the value for the contained decl_const.
        Returns:
        The field value
      • isUnionModified

        public boolean isUnionModified()
        Checks if Declaration 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
      • valid

        public boolean valid()
        Description copied from class: PMessageBuilder
        Checks if the current set data is enough to make a valid struct. It will check for all required fields, and if any are missing it will return false.
        Specified by:
        valid in class PMessageBuilder<Declaration,Declaration._Field>
        Returns:
        True for a valid message.
      • validate

        public void validate()
        Description copied from class: PMessageBuilder
        Checks if the current set data is enough to make a valid struct. It will check for all required fields, and if any are missing it will throw an IllegalStateException with an appropriate error message.
        Specified by:
        validate in class PMessageBuilder<Declaration,Declaration._Field>
      • readBinary

        public void readBinary​(net.morimekta.util.io.BigEndianBinaryReader reader,
                               boolean strict)
                        throws java.io.IOException
        Description copied from interface: BinaryReader
        Read the binary content into the current builder. NOTE: This method is not intended to be used directly. Instead use the BinarySerializer.deserialize(InputStream, PMessageDescriptor) call.
        Specified by:
        readBinary in interface BinaryReader
        Parameters:
        reader - The reader to read from.
        strict - If content should be handled strictly. True means to fail on everything that Apache thrift failed read() on.
        Throws:
        java.io.IOException - When unable to read message for any reason.