Class ProgramType

    • Method Detail

      • getDocumentation

        public java.lang.String getDocumentation()
        Program documentation must come before the first statement of the header.
        Specified by:
        getDocumentation in interface ProgramType_OrBuilder
        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.
        Specified by:
        optionalDocumentation in interface ProgramType_OrBuilder
        Returns:
        Optional of the documentation field value.
      • getProgramName

        @Nonnull
        public java.lang.String getProgramName()
        The program name, deducted from the .thrift IDL file name.
        Specified by:
        getProgramName in interface ProgramType_OrBuilder
        Returns:
        The program_name value
      • getIncludes

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

        include "<program>.thrift"

        Specified by:
        getIncludes in interface ProgramType_OrBuilder
        Returns:
        The includes value
      • optionalIncludes

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

        include "<program>.thrift"

        Specified by:
        optionalIncludes in interface ProgramType_OrBuilder
        Returns:
        Optional of the includes field value.
      • getNamespaces

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

        namespace <key> <value>

        Specified by:
        getNamespaces in interface ProgramType_OrBuilder
        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>

        Specified by:
        optionalNamespaces in interface ProgramType_OrBuilder
        Returns:
        Optional of the namespaces field value.
      • getDecl

        public java.util.List<Declaration> getDecl()
        List of declarations in the program file. Same order as in the thrift file.
        Specified by:
        getDecl in interface ProgramType_OrBuilder
        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.
        Specified by:
        optionalDecl in interface ProgramType_OrBuilder
        Returns:
        Optional of the decl field value.
      • has

        public boolean has​(int key)
        Specified by:
        has in interface PMessageOrBuilder<ProgramType>
        Parameters:
        key - The key of the field.
        Returns:
        Whether the field is present.
      • get

        public <T> T get​(int key)
        Specified by:
        get in interface PMessageOrBuilder<ProgramType>
        Type Parameters:
        T - The return type.
        Parameters:
        key - The key of the field.
        Returns:
        The value of the field.
      • 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()
        Description copied from interface: PMessage
        Pure string representation of content. Does not contain type info.
        Specified by:
        asString in interface PMessage<ProgramType>
        Specified by:
        asString in interface net.morimekta.util.Stringable
        Returns:
        String representation.
      • 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
        Description copied from interface: BinaryWriter
        Write the current message to the binary writer. NOTE: This method is not intended to be used directly. Instead use the BinarySerializer.serialize(OutputStream, PMessageOrBuilder) call.
        Specified by:
        writeBinary in interface BinaryWriter
        Parameters:
        writer - The binary writer to write to.
        Returns:
        The number of bytes written.
        Throws:
        java.io.IOException - If it failed to write the message for any reason.
      • builder

        public static ProgramType._Builder builder()
        Make a p_model.ProgramType builder.
        Returns:
        The builder instance.