/** * This method is the workhorse of the builder. * * @param methodName the name of the method being invoked * @param name the name of the node * @param args the arguments passed into the node * @return the object from the factory */ private Object doInvokeMethod(String methodName, Object name, Object args) { Reference explicitResult = new Reference(); if (checkExplicitMethod(methodName, args, explicitResult)) { return explicitResult.get(); } else { return dispathNodeCall(name, args); } }
/** * This method is the workhorse of the builder. * * @param methodName the name of the method being invoked * @param name the name of the node * @param args the arguments passed into the node * @return the object from the factory */ private Object doInvokeMethod(String methodName, Object name, Object args) { Reference explicitResult = new Reference(); if (checkExplicitMethod(methodName, args, explicitResult)) { return explicitResult.get(); } else { return dispathNodeCall(name, args); } }
/** * This method is the workhorse of the builder. * * @param methodName the name of the method being invoked * @param name the name of the node * @param args the arguments passed into the node * @return the object from the factory */ private Object doInvokeMethod(String methodName, Object name, Object args) { Reference explicitResult = new Reference(); if (checkExplicitMethod(methodName, args, explicitResult)) { return explicitResult.get(); } else { try { return dispathNodeCall(name, args); } catch(MissingMethodException mme) { if(mme.getMethod().equals(methodName) && methodMissingDelegate != null) { return methodMissingDelegate.call(new Object[]{methodName, args}); } throw mme; } } }