Class Declaration._Builder

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

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

      • _Builder

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

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

      • setDeclEnum

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

        @Nonnull
        public Declaration._Builder setDeclEnum​(EnumType._Builder builder)
        Set the decl_enum field value.
        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()
        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
      • getDeclEnum

        public EnumType getDeclEnum()
        Returns:
        The field value
      • setDeclTypedef

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

        @Nonnull
        public Declaration._Builder setDeclTypedef​(TypedefType._Builder builder)
        Set the decl_typedef field value.
        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()
        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
      • getDeclTypedef

        public TypedefType getDeclTypedef()
        Returns:
        The field value
      • setDeclMessage

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

        @Nonnull
        public Declaration._Builder setDeclMessage​(MessageType._Builder builder)
        Set the decl_message field value.
        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()
        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
      • getDeclMessage

        public MessageType getDeclMessage()
        Returns:
        The field value
      • setDeclService

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

        @Nonnull
        public Declaration._Builder setDeclService​(ServiceType._Builder builder)
        Set the decl_service field value.
        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()
        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
      • getDeclService

        public ServiceType getDeclService()
        Returns:
        The field value
      • setDeclConst

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

        @Nonnull
        public Declaration._Builder setDeclConst​(ConstType._Builder builder)
        Set the decl_const field value.
        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()
        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
      • getDeclConst

        public ConstType getDeclConst()
        Returns:
        The field value
      • 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,​Declaration._Field>
      • isSet

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

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

        public void validate()
        Specified by:
        validate in class net.morimekta.providence.PMessageBuilder<Declaration,​Declaration._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 Declaration build()
        Specified by:
        build in interface net.morimekta.providence.PBuilder<Declaration>