Class ConstType

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

    @Generated(value="net.morimekta.providence:providence-generator-java",
               comments="java:serializable")
    @Immutable
    public class ConstType
    extends java.lang.Object
    implements Decl, ConstType_OrBuilder, net.morimekta.providence.PMessage<ConstType>, java.lang.Comparable<ConstType>, java.io.Serializable, net.morimekta.providence.serializer.binary.BinaryWriter
    const <type> <name> = <value>
    See Also:
    Serialized Form
    • Field Detail

      • kDescriptor

        public static final net.morimekta.providence.descriptor.PStructDescriptor<ConstType> kDescriptor
    • Method Detail

      • hasDocumentation

        public boolean hasDocumentation()
        Specified by:
        hasDocumentation in interface Decl
        Returns:
        If documentation is present.
      • getDocumentation

        public java.lang.String getDocumentation()
        Description copied from interface: Decl
        Documentation for the specific declaration.
        Specified by:
        getDocumentation in interface Decl
        Returns:
        The documentation value
      • optionalDocumentation

        @Nonnull
        public java.util.Optional<java.lang.String> optionalDocumentation()
        Description copied from interface: Decl
        Documentation for the specific declaration.
        Specified by:
        optionalDocumentation in interface Decl
        Returns:
        Optional of the documentation field value.
      • getType

        @Nonnull
        public java.lang.String getType()
        Specified by:
        getType in interface ConstType_OrBuilder
        Returns:
        The type value
      • hasName

        public boolean hasName()
        Specified by:
        hasName in interface Decl
        Returns:
        If name is present.
      • getName

        @Nonnull
        public java.lang.String getName()
        Description copied from interface: Decl
        Name of the type, constant or service.
        Specified by:
        getName in interface Decl
        Returns:
        The name value
      • getValue

        @Nonnull
        public java.lang.String getValue()
        Specified by:
        getValue in interface ConstType_OrBuilder
        Returns:
        The value value
      • getAnnotations

        public java.util.Map<java.lang.String,​java.lang.String> getAnnotations()
        Specified by:
        getAnnotations in interface ConstType_OrBuilder
        Returns:
        The annotations value
      • optionalAnnotations

        @Nonnull
        public java.util.Optional<java.util.Map<java.lang.String,​java.lang.String>> optionalAnnotations()
        Specified by:
        optionalAnnotations in interface ConstType_OrBuilder
        Returns:
        Optional of the annotations field value.
      • has

        public boolean has​(int key)
        Specified by:
        has in interface net.morimekta.providence.PMessageOrBuilder<ConstType>
      • get

        public <T> T get​(int key)
        Specified by:
        get in interface net.morimekta.providence.PMessageOrBuilder<ConstType>
      • 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<ConstType>
        Specified by:
        asString in interface net.morimekta.util.Stringable
      • compareTo

        public int compareTo​(ConstType other)
        Specified by:
        compareTo in interface java.lang.Comparable<ConstType>
      • 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
      • mutate

        @Nonnull
        public ConstType._Builder mutate()
        Specified by:
        mutate in interface net.morimekta.providence.PMessage<ConstType>
      • provider

        @Nonnull
        public static net.morimekta.providence.descriptor.PStructDescriptorProvider<ConstType> provider()
      • descriptor

        @Nonnull
        public net.morimekta.providence.descriptor.PStructDescriptor<ConstType> descriptor()
        Specified by:
        descriptor in interface net.morimekta.providence.PMessageOrBuilder<ConstType>
        Specified by:
        descriptor in interface net.morimekta.providence.PValue<ConstType>
      • builder

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