Class FunctionType._Builder

  • All Implemented Interfaces:
    net.morimekta.providence.PBuilder<FunctionType>, net.morimekta.providence.serializer.binary.BinaryReader
    Enclosing class:
    FunctionType

    public static class FunctionType._Builder
    extends net.morimekta.providence.PMessageBuilder<FunctionType,FunctionType._Field>
    implements net.morimekta.providence.serializer.binary.BinaryReader
    (oneway)? <return_type> <name>'('<param>*')' (throws '(' <exception>+ ')')?
    • Constructor Detail

      • _Builder

        public _Builder()
        Make a pmodel.FunctionType builder instance.
      • _Builder

        public _Builder​(FunctionType base)
        Make a mutating builder off a base pmodel.FunctionType.
        Parameters:
        base - The base FunctionType
    • Method Detail

      • setDocumentation

        @Nonnull
        public FunctionType._Builder setDocumentation​(java.lang.String value)
        Set the documentation field value.
        Parameters:
        value - The new value
        Returns:
        The builder
      • isSetDocumentation

        public boolean isSetDocumentation()
        Checks for presence of the documentation field.
        Returns:
        True if documentation has been set.
      • isModifiedDocumentation

        public boolean isModifiedDocumentation()
        Checks if the documentation field has been modified since the builder was created.
        Returns:
        True if documentation has been modified.
      • clearDocumentation

        @Nonnull
        public FunctionType._Builder clearDocumentation()
        Clear the documentation field.
        Returns:
        The builder
      • getDocumentation

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

        @Nonnull
        public FunctionType._Builder setOneWay​(boolean value)
        Set the one_way field value.
        Parameters:
        value - The new value
        Returns:
        The builder
      • isSetOneWay

        public boolean isSetOneWay()
        Checks for presence of the one_way field.
        Returns:
        True if one_way has been set.
      • isModifiedOneWay

        public boolean isModifiedOneWay()
        Checks if the one_way field has been modified since the builder was created.
        Returns:
        True if one_way has been modified.
      • clearOneWay

        @Nonnull
        public FunctionType._Builder clearOneWay()
        Clear the one_way field.
        Returns:
        The builder
      • getOneWay

        public boolean getOneWay()
        Returns:
        The one_way field value
      • setReturnType

        @Nonnull
        public FunctionType._Builder setReturnType​(java.lang.String value)
        Set the return_type field value.
        Parameters:
        value - The new value
        Returns:
        The builder
      • isSetReturnType

        public boolean isSetReturnType()
        Checks for presence of the return_type field.
        Returns:
        True if return_type has been set.
      • isModifiedReturnType

        public boolean isModifiedReturnType()
        Checks if the return_type field has been modified since the builder was created.
        Returns:
        True if return_type has been modified.
      • clearReturnType

        @Nonnull
        public FunctionType._Builder clearReturnType()
        Clear the return_type field.
        Returns:
        The builder
      • getReturnType

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

        @Nonnull
        public FunctionType._Builder setName​(java.lang.String value)
        Set the name field value.
        Parameters:
        value - The new value
        Returns:
        The builder
      • isSetName

        public boolean isSetName()
        Checks for presence of the name field.
        Returns:
        True if name has been set.
      • isModifiedName

        public boolean isModifiedName()
        Checks if the name field has been modified since the builder was created.
        Returns:
        True if name has been modified.
      • clearName

        @Nonnull
        public FunctionType._Builder clearName()
        Clear the name field.
        Returns:
        The builder
      • getName

        public java.lang.String getName()
        Returns:
        The name field value
      • setParams

        @Nonnull
        public FunctionType._Builder setParams​(java.util.Collection<FieldType> value)
        Set the params field value.
        Parameters:
        value - The new value
        Returns:
        The builder
      • addToParams

        @Nonnull
        public FunctionType._Builder addToParams​(FieldType... values)
        Adds entries to the params list.
        Parameters:
        values - The added value
        Returns:
        The builder
      • isSetParams

        public boolean isSetParams()
        Checks for presence of the params field.
        Returns:
        True if params has been set.
      • isModifiedParams

        public boolean isModifiedParams()
        Checks if the params field has been modified since the builder was created.
        Returns:
        True if params has been modified.
      • clearParams

        @Nonnull
        public FunctionType._Builder clearParams()
        Clear the params field.
        Returns:
        The builder
      • mutableParams

        @Nonnull
        public java.util.List<FieldType> mutableParams()
        Get the builder for the contained params message field.
        Returns:
        The field message builder
      • setExceptions

        @Nonnull
        public FunctionType._Builder setExceptions​(java.util.Collection<FieldType> value)
        Set the exceptions field value.
        Parameters:
        value - The new value
        Returns:
        The builder
      • addToExceptions

        @Nonnull
        public FunctionType._Builder addToExceptions​(FieldType... values)
        Adds entries to the exceptions list.
        Parameters:
        values - The added value
        Returns:
        The builder
      • isSetExceptions

        public boolean isSetExceptions()
        Checks for presence of the exceptions field.
        Returns:
        True if exceptions has been set.
      • isModifiedExceptions

        public boolean isModifiedExceptions()
        Checks if the exceptions field has been modified since the builder was created.
        Returns:
        True if exceptions has been modified.
      • clearExceptions

        @Nonnull
        public FunctionType._Builder clearExceptions()
        Clear the exceptions field.
        Returns:
        The builder
      • mutableExceptions

        @Nonnull
        public java.util.List<FieldType> mutableExceptions()
        Get the builder for the contained exceptions message field.
        Returns:
        The field message builder
      • setAnnotations

        @Nonnull
        public FunctionType._Builder setAnnotations​(java.util.Map<java.lang.String,java.lang.String> value)
        Set the annotations field value.
        Parameters:
        value - The new value
        Returns:
        The builder
      • putInAnnotations

        @Nonnull
        public FunctionType._Builder putInAnnotations​(java.lang.String key,
                                                      java.lang.String value)
        Adds a mapping to the annotations map.
        Parameters:
        key - The inserted key
        value - The inserted value
        Returns:
        The builder
      • isSetAnnotations

        public boolean isSetAnnotations()
        Checks for presence of the annotations field.
        Returns:
        True if annotations has been set.
      • isModifiedAnnotations

        public boolean isModifiedAnnotations()
        Checks if the annotations field has been modified since the builder was created.
        Returns:
        True if annotations has been modified.
      • clearAnnotations

        @Nonnull
        public FunctionType._Builder clearAnnotations()
        Clear the annotations field.
        Returns:
        The builder
      • mutableAnnotations

        @Nonnull
        public java.util.Map<java.lang.String,java.lang.String> mutableAnnotations()
        Get the builder for the contained annotations message field.
        Returns:
        The field message builder
      • setStartPos

        @Nonnull
        public FunctionType._Builder setStartPos​(FilePos value)
        Set the start_pos field value.

        The start of the definition (position of return type)

        Parameters:
        value - The new value
        Returns:
        The builder
      • setStartPos

        @Nonnull
        public FunctionType._Builder setStartPos​(FilePos._Builder builder)
        Set the start_pos field value.

        The start of the definition (position of return type)

        Parameters:
        builder - builder for the new value
        Returns:
        The builder
      • isSetStartPos

        public boolean isSetStartPos()
        Checks for presence of the start_pos field.
        Returns:
        True if start_pos has been set.
      • isModifiedStartPos

        public boolean isModifiedStartPos()
        Checks if the start_pos field has been modified since the builder was created.
        Returns:
        True if start_pos has been modified.
      • clearStartPos

        @Nonnull
        public FunctionType._Builder clearStartPos()
        Clear the start_pos field.
        Returns:
        The builder
      • mutableStartPos

        @Nonnull
        public FilePos._Builder mutableStartPos()
        Get the builder for the contained start_pos message field.

        The start of the definition (position of return type)

        Returns:
        The field message builder
      • getStartPos

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

        @Nonnull
        public FunctionType._Builder setEndPos​(FilePos value)
        Set the end_pos field value.

        The end of the definition

        Parameters:
        value - The new value
        Returns:
        The builder
      • setEndPos

        @Nonnull
        public FunctionType._Builder setEndPos​(FilePos._Builder builder)
        Set the end_pos field value.

        The end of the definition

        Parameters:
        builder - builder for the new value
        Returns:
        The builder
      • isSetEndPos

        public boolean isSetEndPos()
        Checks for presence of the end_pos field.
        Returns:
        True if end_pos has been set.
      • isModifiedEndPos

        public boolean isModifiedEndPos()
        Checks if the end_pos field has been modified since the builder was created.
        Returns:
        True if end_pos has been modified.
      • clearEndPos

        @Nonnull
        public FunctionType._Builder clearEndPos()
        Clear the end_pos field.
        Returns:
        The builder
      • mutableEndPos

        @Nonnull
        public FilePos._Builder mutableEndPos()
        Get the builder for the contained end_pos message field.

        The end of the definition

        Returns:
        The field message builder
      • getEndPos

        public FilePos getEndPos()
        The end of the definition
        Returns:
        The 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
      • mutator

        public net.morimekta.providence.PMessageBuilder mutator​(int key)
        Specified by:
        mutator in class net.morimekta.providence.PMessageBuilder<FunctionType,FunctionType._Field>
      • isModified

        public boolean isModified​(int key)
        Specified by:
        isModified in class net.morimekta.providence.PMessageBuilder<FunctionType,FunctionType._Field>
      • readBinary

        public void readBinary​(net.morimekta.util.io.BigEndianBinaryReader reader,
                               boolean strict)
                        throws java.io.IOException
        Specified by:
        readBinary in interface net.morimekta.providence.serializer.binary.BinaryReader
        Throws:
        java.io.IOException
      • build

        public FunctionType build()
        Specified by:
        build in interface net.morimekta.providence.PBuilder<FunctionType>