final Class<?> engine = ScriptEngineNode.this.engine.getClass(); final Class<?>[] argTypes = new Class[]{String.class, Object[].class}; final Method method = engine.getDeclaredMethod(methodToInvoke, argTypes); final Object[] params = new Object[]{this.functionName, this.getInvoker(), _input, this.getStack()}; final Object _result = method.invoke(ScriptEngineNode.this.engine, params);The method is defined as: public Object invokeFunction(String name, Object... args) throws ScriptException, NoSuchMethodException;(in this case, that's what methodToInvoke contains)