Class ProgramType

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

    @Generated("providence-maven-plugin")
    @Immutable
    public class ProgramType
    extends java.lang.Object
    implements net.morimekta.providence.PMessage<ProgramType,ProgramType._Field>, java.lang.Comparable<ProgramType>, java.io.Serializable, net.morimekta.providence.serializer.binary.BinaryWriter
    <namespace>* <include>* <declataion>*
    See Also:
    Serialized Form
    • Method Detail

      • hasDocumentation

        public boolean hasDocumentation()
      • getDocumentation

        public java.lang.String getDocumentation()
        Program documentation must come before the first statement of the header.
        Returns:
        The documentation value
      • optionalDocumentation

        @Nonnull
        public java.util.Optional<java.lang.String> optionalDocumentation()
        Program documentation must come before the first statement of the header.
        Returns:
        Optional of the documentation field value.
      • hasProgramName

        public boolean hasProgramName()
      • getProgramName

        @Nonnull
        public java.lang.String getProgramName()
        The program name, deducted from the .thrift IDL file name.
        Returns:
        The program_name value
      • numIncludes

        public int numIncludes()
      • hasIncludes

        public boolean hasIncludes()
      • getIncludes

        public java.util.List<java.lang.String> getIncludes()
        List of included thrift files. Same as from the actual thrift file.

        include "<program>.thrift"

        Returns:
        The includes value
      • optionalIncludes

        @Nonnull
        public java.util.Optional<java.util.List<java.lang.String>> optionalIncludes()
        List of included thrift files. Same as from the actual thrift file.

        include "<program>.thrift"

        Returns:
        Optional of the includes field value.
      • numNamespaces

        public int numNamespaces()
      • hasNamespaces

        public boolean hasNamespaces()
      • getNamespaces

        public java.util.Map<java.lang.String,java.lang.String> getNamespaces()
        Map of language to laguage dependent namespace identifier.

        namespace <key> <value>

        Returns:
        The namespaces value
      • optionalNamespaces

        @Nonnull
        public java.util.Optional<java.util.Map<java.lang.String,java.lang.String>> optionalNamespaces()
        Map of language to laguage dependent namespace identifier.

        namespace <key> <value>

        Returns:
        Optional of the namespaces field value.
      • numDecl

        public int numDecl()
      • hasDecl

        public boolean hasDecl()
      • getDecl

        public java.util.List<Declaration> getDecl()
        List of declarations in the program file. Same order as in the thrift file.
        Returns:
        The decl value
      • optionalDecl

        @Nonnull
        public java.util.Optional<java.util.List<Declaration>> optionalDecl()
        List of declarations in the program file. Same order as in the thrift file.
        Returns:
        Optional of the decl 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<ProgramType,ProgramType._Field>
        Specified by:
        asString in interface net.morimekta.util.Stringable
      • compareTo

        public int compareTo​(ProgramType other)
        Specified by:
        compareTo in interface java.lang.Comparable<ProgramType>
      • 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 ProgramType._Builder builder()
        Make a pmodel.ProgramType builder.
        Returns:
        The builder instance.