Class ProgramMeta

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<ProgramMeta>, net.morimekta.providence.PMessage<ProgramMeta,​ProgramMeta._Field>, net.morimekta.providence.PValue<ProgramMeta>, net.morimekta.providence.serializer.binary.BinaryWriter, net.morimekta.util.Stringable

    @Generated("providence-maven-plugin")
    @Immutable
    public class ProgramMeta
    extends java.lang.Object
    implements net.morimekta.providence.PMessage<ProgramMeta,​ProgramMeta._Field>, java.lang.Comparable<ProgramMeta>, java.io.Serializable, net.morimekta.providence.serializer.binary.BinaryWriter
    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.
    See Also:
    Serialized Form
    • Method Detail

      • hasFilePath

        public boolean hasFilePath()
      • getFilePath

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

        @Nonnull
        public java.util.Optional<java.lang.String> optionalFilePath()
        Full absolute path to the file.
        Returns:
        Optional of the file_path field value.
      • numFileLines

        public int numFileLines()
      • hasFileLines

        public boolean hasFileLines()
      • getFileLines

        public java.util.List<java.lang.String> getFileLines()
        The lines of the program file
        Returns:
        The file_lines value
      • optionalFileLines

        @Nonnull
        public java.util.Optional<java.util.List<java.lang.String>> optionalFileLines()
        The lines of the program file
        Returns:
        Optional of the file_lines field value.
      • hasProgram

        public boolean hasProgram()
      • getProgram

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

        @Nonnull
        public java.util.Optional<ProgramType> optionalProgram()
        The program type definition
        Returns:
        Optional of the program field value.
      • numIncludes

        public int numIncludes()
      • hasIncludes

        public boolean hasIncludes()
      • getIncludes

        public java.util.Map<java.lang.String,​ProgramMeta> getIncludes()
        Map of program name to meta of included programs
        Returns:
        The includes value
      • optionalIncludes

        @Nonnull
        public java.util.Optional<java.util.Map<java.lang.String,​ProgramMeta>> optionalIncludes()
        Map of program name to meta of included programs
        Returns:
        Optional of the includes 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
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • asString

        @Nonnull
        public java.lang.String asString()
        Specified by:
        asString in interface net.morimekta.providence.PMessage<ProgramMeta,​ProgramMeta._Field>
        Specified by:
        asString in interface net.morimekta.util.Stringable
      • compareTo

        public int compareTo​(ProgramMeta other)
        Specified by:
        compareTo in interface java.lang.Comparable<ProgramMeta>
      • writeBinary

        public int writeBinary​(net.morimekta.util.io.BigEndianBinaryWriter writer)
                        throws java.io.IOException
        Specified by:
        writeBinary in interface net.morimekta.providence.serializer.binary.BinaryWriter
        Throws:
        java.io.IOException
      • builder

        public static ProgramMeta._Builder builder()
        Make a pmodel.ProgramMeta builder.
        Returns:
        The builder instance.