8 arguments ... enough ?
memberFunctionName = "call" + parametersArray.size(); if (expectedParameterCount > 0) { method.invoke(SDCFunction, context, Arrays.copyOfRange(parametersArray, 0, expectedParameterCount)); } else { method.invoke(SDCFunction, context); } // LATER IN THE CLASS .... public Object call0(EvaluationContext context, Object... args) { try { return convert(method.invoke(SDCFunction, context)); } catch (Exception e) { throw new RuntimeException(e); } } public Object call1(EvaluationContext context, Object... args) { try { return convert(method.invoke(SDCFunction, context, args[0])); } catch (Exception e) { throw new RuntimeException(e); } } public Object call2(EvaluationContext context, Object... args) { try { return convert(method.invoke(SDCFunction, context, args[0], args[1])); } catch (Exception e) { throw new RuntimeException(e); } } public Object call3(EvaluationContext context, Object... args) { try { return convert(method.invoke(SDCFunction, context, args[0], args[1], args[2])); } catch (Exception e) { throw new RuntimeException(e); } } public Object call4(EvaluationContext context, Object... args) { try { return convert(method.invoke(SDCFunction, context, args[0], args[1], args[2], args[3])); } catch (Exception e) { throw new RuntimeException(e); } } public Object call5(EvaluationContext context, Object... args) { try { return convert(method.invoke(SDCFunction, context, args[0], args[1], args[2], args[3], args[4])); } catch (Exception e) { throw new RuntimeException(e); } } public Object call6(EvaluationContext context, Object... args) { try { return convert(method.invoke(SDCFunction, context, args[0], args[1], args[2], args[3], args[4], args[5])); } catch (Exception e) { throw new RuntimeException(e); } } public Object call7(EvaluationContext context, Object... args) { try { return convert(method.invoke(SDCFunction, context, args[0], args[1], args[2], args[3], args[4], args[5], args[6])); } catch (Exception e) { throw new RuntimeException(e); } } public Object call8(EvaluationContext context, Object... args) { try { return convert(method.invoke(SDCFunction, context, args[0], args[1], args[2], args[3], args[4], args[5], args[6], args[7])); } catch (Exception e) { throw new RuntimeException(e); } }












