Class ConstType

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

    @Generated("providence-maven-plugin")
    @Immutable
    public class ConstType
    extends java.lang.Object
    implements net.morimekta.providence.PMessage<ConstType,​ConstType._Field>, 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,​ConstType._Field> kDescriptor
    • Method Detail

      • hasDocumentation

        public boolean hasDocumentation()
      • getDocumentation

        public java.lang.String getDocumentation()
        Returns:
        The documentation value
      • optionalDocumentation

        @Nonnull
        public java.util.Optional<java.lang.String> optionalDocumentation()
        Returns:
        Optional of the documentation field value.
      • hasType

        public boolean hasType()
      • getType

        @Nonnull
        public java.lang.String getType()
        Returns:
        The type value
      • hasName

        public boolean hasName()
      • getName

        @Nonnull
        public java.lang.String getName()
        Returns:
        The name value
      • hasValue

        public boolean hasValue()
      • getValue

        @Nonnull
        public java.lang.String getValue()
        Returns:
        The value value
      • numAnnotations

        public int numAnnotations()
      • hasAnnotations

        public boolean hasAnnotations()
      • getAnnotations

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

        @Nonnull
        public java.util.Optional<java.util.Map<java.lang.String,​java.lang.String>> optionalAnnotations()
        Returns:
        Optional of the annotations field value.
      • hasValueStartPos

        public boolean hasValueStartPos()
      • getValueStartPos

        public FilePos getValueStartPos()
        Note the start of the const in the parsed thrift file, this can be used for making more accurate exception / parse data from the const parser.
        Returns:
        The value_start_pos value
      • optionalValueStartPos

        @Nonnull
        public java.util.Optional<FilePos> optionalValueStartPos()
        Note the start of the const in the parsed thrift file, this can be used for making more accurate exception / parse data from the const parser.
        Returns:
        Optional of the value_start_pos field value.
      • hasStartPos

        public boolean hasStartPos()
      • getStartPos

        public FilePos getStartPos()
        The start of the definition (position of 'enum')
        Returns:
        The start_pos value
      • optionalStartPos

        @Nonnull
        public java.util.Optional<FilePos> optionalStartPos()
        The start of the definition (position of 'enum')
        Returns:
        Optional of the start_pos field value.
      • hasEndPos

        public boolean hasEndPos()
      • getEndPos

        public FilePos getEndPos()
        The end of the definition (position of '}')
        Returns:
        The end_pos value
      • optionalEndPos

        @Nonnull
        public java.util.Optional<FilePos> optionalEndPos()
        The end of the definition (position of '}')
        Returns:
        Optional of the end_pos field value.
      • has

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

        public <T> T get​(int key)
        Specified by:
        get in interface net.morimekta.providence.PMessage<ConstType,​ConstType._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()
        Specified by:
        asString in interface net.morimekta.providence.PMessage<ConstType,​ConstType._Field>
        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
      • provider

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

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

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