Class FunctionType

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

    @Generated("providence-maven-plugin")
    @Immutable
    public class FunctionType
    extends java.lang.Object
    implements net.morimekta.providence.PMessage<FunctionType,FunctionType._Field>, java.lang.Comparable<FunctionType>, java.io.Serializable, net.morimekta.providence.serializer.binary.BinaryWriter
    (oneway)? <return_type> <name>'('<param>*')' (throws '(' <exception>+ ')')?
    See Also:
    Serialized Form
    • 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.
      • hasOneWay

        public boolean hasOneWay()
      • isOneWay

        public boolean isOneWay()
        Returns:
        The one_way value
      • optionalOneWay

        @Nonnull
        public java.util.Optional<java.lang.Boolean> optionalOneWay()
        Returns:
        Optional of the one_way field value.
      • hasReturnType

        public boolean hasReturnType()
      • getReturnType

        public java.lang.String getReturnType()
        Returns:
        The return_type value
      • optionalReturnType

        @Nonnull
        public java.util.Optional<java.lang.String> optionalReturnType()
        Returns:
        Optional of the return_type field value.
      • hasName

        public boolean hasName()
      • getName

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

        public int numParams()
      • hasParams

        public boolean hasParams()
      • getParams

        @Nonnull
        public java.util.List<FieldType> getParams()
        Returns:
        The params value
      • numExceptions

        public int numExceptions()
      • hasExceptions

        public boolean hasExceptions()
      • getExceptions

        public java.util.List<FieldType> getExceptions()
        Returns:
        The exceptions value
      • optionalExceptions

        @Nonnull
        public java.util.Optional<java.util.List<FieldType>> optionalExceptions()
        Returns:
        Optional of the exceptions field 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.
      • hasStartPos

        public boolean hasStartPos()
      • getStartPos

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

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

        public boolean hasEndPos()
      • getEndPos

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

        @Nonnull
        public java.util.Optional<FilePos> optionalEndPos()
        The end of the definition
        Returns:
        Optional of the end_pos 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<FunctionType,FunctionType._Field>
        Specified by:
        asString in interface net.morimekta.util.Stringable
      • compareTo

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