public AviatorObject invoke(Map<String, Object> env, List<AviatorObject> list) {
if (cachedFunction == null) {
cachedFunction = (AviatorFunction) env.get(this.methodName);
}
if (cachedFunction == null) {
throw new ExpressionRuntimeException("Could not find method named " + methodName);
}
final AviatorObject result = cachedFunction.call(env, list.toArray(new AviatorObject[list.size()]));
return result == null ? AviatorNil.NIL : result;
}