Interface GQLFieldProvider<Message extends PMessage<Message>>

    • Method Detail

      • getDescriptor

        PMessageDescriptor<Message> getDescriptor()
        Get the type descriptor this mutator is for. This may be an interface type. Only used for error messages. This type must be indicative of the fields accepted by the provider.
        Returns:
        The message type being mutated.
      • getFields

        @Nonnull
        java.util.Collection<PField<Message>> getFields()
        Get the set of fields that can be mutated with this mutator.
        Returns:
        Collection of mutating fields.
      • provide

        java.lang.Object provide​(@Nonnull
                                 Message message,
                                 @Nonnull
                                 PField<Message> field,
                                 @Nonnull
                                 GQLField selection)
        Mutate the message according to the field selection. The field selection will represent a single field in the base message, and will be called for each requested field.
        Parameters:
        message - The base message builder to be mutated.
        field - The source field requested.
        selection - The field selection to be filled or changed.
        Returns:
        The mutated value for the field.