public class ClosureSourceBinding
extends Object
implements SourceBinding
Uses a closure invocation to compute a source value for a binding.
| Constructor and description |
|---|
ClosureSourceBinding(Closure closure)Creates a source binding that invokes the closure with no arguments. |
ClosureSourceBinding(Closure closure, Object[] arguments)Creates a source binding that invokes the closure with the supplied arguments. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public Closure |
getClosure()Returns the closure used to compute source values. |
|
public Object |
getSourceValue()Invokes the configured closure with the current argument list. |
|
public void |
setClosure(Closure closure)Replaces the closure used to compute source values. |
|
public void |
setClosureArgument(Object argument)Replaces the closure arguments with a single argument. |
|
public void |
setClosureArguments(Object[] arguments)Replaces the full argument list passed to the closure. |
Creates a source binding that invokes the closure with no arguments.
closure - the closure used to compute source valuesReturns the closure used to compute source values.
Invokes the configured closure with the current argument list.
Replaces the closure used to compute source values.
closure - the new source closureReplaces the closure arguments with a single argument.
argument - the single closure argument to useReplaces the full argument list passed to the closure.
arguments - the closure arguments to useCopyright © 2003-2026 The Apache Software Foundation. All rights reserved.