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 Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static BindingsSupplierofMap(Map<String,Object> map)Returns aBindingsSupplierthat encapsulates a map of objects.static BindingsSuppliersingleBinding(String name, Object value)Returns aBindingsSupplierthat encapsulates a single binding.voidsupplyBindings(Script script, BindingsBuilder accumulator)Supplies this suppliers bindings for the given script.
-
-
-
Method Detail
-
singleBinding
static BindingsSupplier singleBinding(String name, Object value)
Returns aBindingsSupplierthat encapsulates a single binding.- Parameters:
name- the name of the bindingvalue- the corresponding value- Returns:
- the resultant bindings supplier
-
ofMap
static BindingsSupplier ofMap(Map<String,Object> map)
Returns aBindingsSupplierthat encapsulates a map of objects.- Parameters:
map- the map of bindings- 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 foraccumulator- the accumulator
-
-