configure

open fun <T> configure(@Nullable configureClosure: Closure, target: T): T(source)

Configures target with configureClosure, via the Configurable interface if necessary.

If target does not implement Configurable interface, it is set as the delegate of a clone of configureClosure with a resolve strategy of DELEGATE_FIRST.

If target does implement the Configurable interface, the configureClosure will be passed to delegate's configure method.

Return

The delegate param

Parameters

configureClosure

The configuration closure

target

The object to be configured