Interface BindingsSupplier

  • Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface BindingsSupplier
    Supplies a set of bindings for scripts to use at runtime.
    • Method Detail

      • singleBinding

        static BindingsSupplier singleBinding​(String name,
                                              Object value)
        Returns a BindingsSupplier that encapsulates a single binding.
        Parameters:
        name - the name of the binding
        value - the corresponding value
        Returns:
        the resultant bindings supplier
      • supplyBindings

        void supplyBindings​(Script script,
                            BindingsBuilder accumulator)
        Supplies this suppliers bindings for the given script.
        Parameters:
        script - the script the bindings are for
        accumulator - the accumulator