
org.tools4j.groovytables.ClosureCallPrecursor.groovy Maven / Gradle / Ivy
package org.tools4j.groovytables
import groovy.transform.ToString
/**
* User: ben
* Date: 14/03/2016
* Time: 5:45 PM
*/
@ToString
class ClosureCallPrecursor implements CallPrecursor{
final Suitability suitability;
final Object[] rawArgs;
final Object[] coercedArgs;
final ClosureMethod.ClosureCall closureCall;
final static NOT_SUITABLE = new ClosureCallPrecursor(Suitability.NOT_SUITABLE, null, null, null);
ClosureCallPrecursor(final Suitability suitability, final Object[] rawArgs, final Object[] coercedArgs, final ClosureMethod.ClosureCall closureCall) {
this.suitability = suitability
this.rawArgs = rawArgs
this.coercedArgs = coercedArgs
this.closureCall = closureCall
}
T executeMethod() {
return closureCall.call(coercedArgs)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy