public class ConfigMethodInvoker extends Object
Constructor and Description |
---|
ConfigMethodInvoker(EvalScriptEngine engine,
EvalProject project) |
Modifier and Type | Method and Description |
---|---|
Object |
callExternalMethod(String name,
Object... args)
Find an external method (a builder or task) and return a closure that, when invoked,
constructs and configures it.
|
void |
clearDeps(Object obj) |
List<ListenableFuture<?>> |
getDeps(Object obj) |
Object |
invokeConfigurationMethod(Object target,
String name,
Object... args) |
void |
registerDep(Object obj,
ListenableFuture<?> dep) |
org.apache.commons.lang3.tuple.Pair<Object[],groovy.lang.Closure> |
splitClosure(Object[] args)
Split an array of arguments into arguments a trailing closure.
|
public ConfigMethodInvoker(@Nonnull EvalScriptEngine engine, @Nonnull EvalProject project)
public void registerDep(Object obj, ListenableFuture<?> dep)
public List<ListenableFuture<?>> getDeps(Object obj)
public void clearDeps(Object obj)
public org.apache.commons.lang3.tuple.Pair<Object[],groovy.lang.Closure> splitClosure(Object[] args)
args
- The argument array.Pair.of(args, null)
is returned.public Object callExternalMethod(String name, Object... args) throws NoSuchMethodException
name
- The method name.NoSuchMethodException