final GrClosableBlock[] closures = methodCall.getClosureArguments();
if (closures.length == 1) return closures[0];
if (closures.length > 1) return null;
final GrExpression[] args = methodCall.getExpressionArguments();
if (args.length == 0) return null;
final GrExpression last = DefaultGroovyMethods.last(args);
if (last instanceof GrClosableBlock) {
return (GrClosableBlock)last;
}
return null;