Package dev.cel.expr

Class Reference.Builder

    • Method Detail

      • getDefaultInstanceForType

        public Reference getDefaultInstanceForType()
        Description copied from interface: MessageLiteOrBuilder
        Get an instance of the type with no fields set. Because no fields are set, all getters for singular fields will return default values and repeated fields will appear empty. This may or may not be a singleton. This differs from the getDefaultInstance() method of generated message classes in that this method is an abstract method of the MessageLite interface whereas getDefaultInstance() is a static method of a specific class. They return the same thing.
        Specified by:
        getDefaultInstanceForType in interface MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface MessageOrBuilder
      • mergeFrom

        public Reference.Builder mergeFrom​(Message other)
        Description copied from interface: Message.Builder
        Merge other into the message being built. other must have the exact same type as this (i.e. getDescriptorForType() == other.getDescriptorForType()).

        Merging occurs as follows. For each field:
        * For singular primitive fields, if the field is set in other, then other's value overwrites the value in this message.
        * For singular message fields, if the field is set in other, it is merged into the corresponding sub-message of this message using the same merging rules.
        * For repeated fields, the elements in other are concatenated with the elements in this message.
        * For oneof groups, if the other message has one of the fields set, the group of this message is cleared and replaced by the field of the other message, so that the oneof constraint is preserved.

        This is equivalent to the Message::MergeFrom method in C++.

        Specified by:
        mergeFrom in interface Message.Builder
        Overrides:
        mergeFrom in class AbstractMessage.Builder<Reference.Builder>
      • getName

        public java.lang.String getName()
         The fully qualified name of the declaration.
         
        string name = 1;
        Specified by:
        getName in interface ReferenceOrBuilder
        Returns:
        The name.
      • getNameBytes

        public ByteString getNameBytes()
         The fully qualified name of the declaration.
         
        string name = 1;
        Specified by:
        getNameBytes in interface ReferenceOrBuilder
        Returns:
        The bytes for name.
      • setName

        public Reference.Builder setName​(java.lang.String value)
         The fully qualified name of the declaration.
         
        string name = 1;
        Parameters:
        value - The name to set.
        Returns:
        This builder for chaining.
      • clearName

        public Reference.Builder clearName()
         The fully qualified name of the declaration.
         
        string name = 1;
        Returns:
        This builder for chaining.
      • setNameBytes

        public Reference.Builder setNameBytes​(ByteString value)
         The fully qualified name of the declaration.
         
        string name = 1;
        Parameters:
        value - The bytes for name to set.
        Returns:
        This builder for chaining.
      • getOverloadIdList

        public ProtocolStringList getOverloadIdList()
         For references to functions, this is a list of `Overload.overload_id`
         values which match according to typing rules.
         If the list has more than one element, overload resolution among the
         presented candidates must happen at runtime because of dynamic types. The
         type checker attempts to narrow down this list as much as possible.
         Empty if this is not a reference to a
         [Decl.FunctionDecl][cel.expr.Decl.FunctionDecl].
         
        repeated string overload_id = 3;
        Specified by:
        getOverloadIdList in interface ReferenceOrBuilder
        Returns:
        A list containing the overloadId.
      • getOverloadIdCount

        public int getOverloadIdCount()
         For references to functions, this is a list of `Overload.overload_id`
         values which match according to typing rules.
         If the list has more than one element, overload resolution among the
         presented candidates must happen at runtime because of dynamic types. The
         type checker attempts to narrow down this list as much as possible.
         Empty if this is not a reference to a
         [Decl.FunctionDecl][cel.expr.Decl.FunctionDecl].
         
        repeated string overload_id = 3;
        Specified by:
        getOverloadIdCount in interface ReferenceOrBuilder
        Returns:
        The count of overloadId.
      • getOverloadId

        public java.lang.String getOverloadId​(int index)
         For references to functions, this is a list of `Overload.overload_id`
         values which match according to typing rules.
         If the list has more than one element, overload resolution among the
         presented candidates must happen at runtime because of dynamic types. The
         type checker attempts to narrow down this list as much as possible.
         Empty if this is not a reference to a
         [Decl.FunctionDecl][cel.expr.Decl.FunctionDecl].
         
        repeated string overload_id = 3;
        Specified by:
        getOverloadId in interface ReferenceOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The overloadId at the given index.
      • getOverloadIdBytes

        public ByteString getOverloadIdBytes​(int index)
         For references to functions, this is a list of `Overload.overload_id`
         values which match according to typing rules.
         If the list has more than one element, overload resolution among the
         presented candidates must happen at runtime because of dynamic types. The
         type checker attempts to narrow down this list as much as possible.
         Empty if this is not a reference to a
         [Decl.FunctionDecl][cel.expr.Decl.FunctionDecl].
         
        repeated string overload_id = 3;
        Specified by:
        getOverloadIdBytes in interface ReferenceOrBuilder
        Parameters:
        index - The index of the value to return.
        Returns:
        The bytes of the overloadId at the given index.
      • setOverloadId

        public Reference.Builder setOverloadId​(int index,
                                               java.lang.String value)
         For references to functions, this is a list of `Overload.overload_id`
         values which match according to typing rules.
         If the list has more than one element, overload resolution among the
         presented candidates must happen at runtime because of dynamic types. The
         type checker attempts to narrow down this list as much as possible.
         Empty if this is not a reference to a
         [Decl.FunctionDecl][cel.expr.Decl.FunctionDecl].
         
        repeated string overload_id = 3;
        Parameters:
        index - The index to set the value at.
        value - The overloadId to set.
        Returns:
        This builder for chaining.
      • addOverloadId

        public Reference.Builder addOverloadId​(java.lang.String value)
         For references to functions, this is a list of `Overload.overload_id`
         values which match according to typing rules.
         If the list has more than one element, overload resolution among the
         presented candidates must happen at runtime because of dynamic types. The
         type checker attempts to narrow down this list as much as possible.
         Empty if this is not a reference to a
         [Decl.FunctionDecl][cel.expr.Decl.FunctionDecl].
         
        repeated string overload_id = 3;
        Parameters:
        value - The overloadId to add.
        Returns:
        This builder for chaining.
      • addAllOverloadId

        public Reference.Builder addAllOverloadId​(java.lang.Iterable<java.lang.String> values)
         For references to functions, this is a list of `Overload.overload_id`
         values which match according to typing rules.
         If the list has more than one element, overload resolution among the
         presented candidates must happen at runtime because of dynamic types. The
         type checker attempts to narrow down this list as much as possible.
         Empty if this is not a reference to a
         [Decl.FunctionDecl][cel.expr.Decl.FunctionDecl].
         
        repeated string overload_id = 3;
        Parameters:
        values - The overloadId to add.
        Returns:
        This builder for chaining.
      • clearOverloadId

        public Reference.Builder clearOverloadId()
         For references to functions, this is a list of `Overload.overload_id`
         values which match according to typing rules.
         If the list has more than one element, overload resolution among the
         presented candidates must happen at runtime because of dynamic types. The
         type checker attempts to narrow down this list as much as possible.
         Empty if this is not a reference to a
         [Decl.FunctionDecl][cel.expr.Decl.FunctionDecl].
         
        repeated string overload_id = 3;
        Returns:
        This builder for chaining.
      • addOverloadIdBytes

        public Reference.Builder addOverloadIdBytes​(ByteString value)
         For references to functions, this is a list of `Overload.overload_id`
         values which match according to typing rules.
         If the list has more than one element, overload resolution among the
         presented candidates must happen at runtime because of dynamic types. The
         type checker attempts to narrow down this list as much as possible.
         Empty if this is not a reference to a
         [Decl.FunctionDecl][cel.expr.Decl.FunctionDecl].
         
        repeated string overload_id = 3;
        Parameters:
        value - The bytes of the overloadId to add.
        Returns:
        This builder for chaining.
      • hasValue

        public boolean hasValue()
         For references to constants, this may contain the value of the
         constant if known at compile time.
         
        .cel.expr.Constant value = 4;
        Specified by:
        hasValue in interface ReferenceOrBuilder
        Returns:
        Whether the value field is set.
      • getValue

        public Constant getValue()
         For references to constants, this may contain the value of the
         constant if known at compile time.
         
        .cel.expr.Constant value = 4;
        Specified by:
        getValue in interface ReferenceOrBuilder
        Returns:
        The value.
      • setValue

        public Reference.Builder setValue​(Constant value)
         For references to constants, this may contain the value of the
         constant if known at compile time.
         
        .cel.expr.Constant value = 4;
      • setValue

        public Reference.Builder setValue​(Constant.Builder builderForValue)
         For references to constants, this may contain the value of the
         constant if known at compile time.
         
        .cel.expr.Constant value = 4;
      • mergeValue

        public Reference.Builder mergeValue​(Constant value)
         For references to constants, this may contain the value of the
         constant if known at compile time.
         
        .cel.expr.Constant value = 4;
      • clearValue

        public Reference.Builder clearValue()
         For references to constants, this may contain the value of the
         constant if known at compile time.
         
        .cel.expr.Constant value = 4;
      • getValueBuilder

        public Constant.Builder getValueBuilder()
         For references to constants, this may contain the value of the
         constant if known at compile time.
         
        .cel.expr.Constant value = 4;
      • getValueOrBuilder

        public ConstantOrBuilder getValueOrBuilder()
         For references to constants, this may contain the value of the
         constant if known at compile time.
         
        .cel.expr.Constant value = 4;
        Specified by:
        getValueOrBuilder in interface ReferenceOrBuilder