Class ProgramMeta._Builder

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

    public static class ProgramMeta._Builder
    extends net.morimekta.providence.PMessageBuilder<ProgramMeta,ProgramMeta._Field>
    implements net.morimekta.providence.serializer.binary.BinaryReader
    A meta object describing a parsed program file. This may include the included programs as their own meta file. The lines of the original program .thrift file is also included.
    • Constructor Detail

      • _Builder

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

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

      • setFilePath

        @Nonnull
        public ProgramMeta._Builder setFilePath​(java.lang.String value)
        Set the file_path field value.

        Full absolute path to the file.

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

        public boolean isSetFilePath()
        Checks for presence of the file_path field.
        Returns:
        True if file_path has been set.
      • isModifiedFilePath

        public boolean isModifiedFilePath()
        Checks if the file_path field has been modified since the builder was created.
        Returns:
        True if file_path has been modified.
      • clearFilePath

        @Nonnull
        public ProgramMeta._Builder clearFilePath()
        Clear the file_path field.
        Returns:
        The builder
      • getFilePath

        public java.lang.String getFilePath()
        Full absolute path to the file.
        Returns:
        The file_path field value
      • setFileLines

        @Nonnull
        public ProgramMeta._Builder setFileLines​(java.util.Collection<java.lang.String> value)
        Set the file_lines field value.

        The lines of the program file

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

        @Nonnull
        public ProgramMeta._Builder addToFileLines​(java.lang.String... values)
        Adds entries to the file_lines list.

        The lines of the program file

        Parameters:
        values - The added value
        Returns:
        The builder
      • isSetFileLines

        public boolean isSetFileLines()
        Checks for presence of the file_lines field.
        Returns:
        True if file_lines has been set.
      • isModifiedFileLines

        public boolean isModifiedFileLines()
        Checks if the file_lines field has been modified since the builder was created.
        Returns:
        True if file_lines has been modified.
      • clearFileLines

        @Nonnull
        public ProgramMeta._Builder clearFileLines()
        Clear the file_lines field.
        Returns:
        The builder
      • mutableFileLines

        @Nonnull
        public java.util.List<java.lang.String> mutableFileLines()
        Get the builder for the contained file_lines message field.

        The lines of the program file

        Returns:
        The field message builder
      • setProgram

        @Nonnull
        public ProgramMeta._Builder setProgram​(ProgramType value)
        Set the program field value.

        The program type definition

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

        @Nonnull
        public ProgramMeta._Builder setProgram​(ProgramType._Builder builder)
        Set the program field value.

        The program type definition

        Parameters:
        builder - builder for the new value
        Returns:
        The builder
      • isSetProgram

        public boolean isSetProgram()
        Checks for presence of the program field.
        Returns:
        True if program has been set.
      • isModifiedProgram

        public boolean isModifiedProgram()
        Checks if the program field has been modified since the builder was created.
        Returns:
        True if program has been modified.
      • clearProgram

        @Nonnull
        public ProgramMeta._Builder clearProgram()
        Clear the program field.
        Returns:
        The builder
      • mutableProgram

        @Nonnull
        public ProgramType._Builder mutableProgram()
        Get the builder for the contained program message field.

        The program type definition

        Returns:
        The field message builder
      • getProgram

        public ProgramType getProgram()
        The program type definition
        Returns:
        The field value
      • setIncludes

        @Nonnull
        public ProgramMeta._Builder setIncludes​(java.util.Map<java.lang.String,ProgramMeta> value)
        Set the includes field value.

        Map of program name to meta of included programs

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

        @Nonnull
        public ProgramMeta._Builder putInIncludes​(java.lang.String key,
                                                  ProgramMeta value)
        Adds a mapping to the includes map.

        Map of program name to meta of included programs

        Parameters:
        key - The inserted key
        value - The inserted value
        Returns:
        The builder
      • isSetIncludes

        public boolean isSetIncludes()
        Checks for presence of the includes field.
        Returns:
        True if includes has been set.
      • isModifiedIncludes

        public boolean isModifiedIncludes()
        Checks if the includes field has been modified since the builder was created.
        Returns:
        True if includes has been modified.
      • clearIncludes

        @Nonnull
        public ProgramMeta._Builder clearIncludes()
        Clear the includes field.
        Returns:
        The builder
      • mutableIncludes

        @Nonnull
        public java.util.Map<java.lang.String,ProgramMeta> mutableIncludes()
        Get the builder for the contained includes message field.

        Map of program name to meta of included programs

        Returns:
        The field message builder
      • 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<ProgramMeta,ProgramMeta._Field>
      • isSet

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

        public boolean isModified​(int key)
        Specified by:
        isModified in class net.morimekta.providence.PMessageBuilder<ProgramMeta,ProgramMeta._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 ProgramMeta build()
        Specified by:
        build in interface net.morimekta.providence.PBuilder<ProgramMeta>