/** * Convenience method when no arguments are required * * @param methodName the name of the method to invoke * @return the result of the call */ public Object invokeMethod(String methodName) { return invokeMethod(methodName, null); }
/** * Allow automatic detection of namespace declared in the attributes */ @Override public Object invokeMethod(String methodName, Object args) { // detect namespace declared on the added node like xmlns:foo="http:/foo" Map attributes = findAttributes(args); for (Iterator<Map.Entry> iter = attributes.entrySet().iterator(); iter.hasNext();) { Map.Entry entry = iter.next(); String key = String.valueOf(entry.getKey()); if (key.startsWith("xmlns:")) { String prefix = key.substring(6); String uri = String.valueOf(entry.getValue()); namespace(uri, prefix); iter.remove(); } } return super.invokeMethod(methodName, args); }
/** * Convenience method when no arguments are required * * @param methodName the name of the method to invoke * @return the result of the call */ public Object invokeMethod(String methodName) { return invokeMethod(methodName, null); }
/** * Convenience method when no arguments are required * @return the result of the call * @param methodName the name of the method to invoke */ public Object invokeMethod(String methodName) { return invokeMethod(methodName, null); }
/** * Convenience method when no arguments are required * * @param methodName the name of the method to invoke * @return the result of the call */ public Object invokeMethod(String methodName) { return invokeMethod(methodName, null); }
/** * Convenience method when no arguments are required * * @param methodName the name of the method to invoke * @return the result of the call */ public Object invokeMethod(String methodName) { return invokeMethod(methodName, null); }
/** * Allow automatic detection of namespace declared in the attributes */ @Override public Object invokeMethod(String methodName, Object args) { // detect namespace declared on the added node like xmlns:foo="http:/foo" Map attributes = findAttributes(args); for (Iterator<Map.Entry> iter = attributes.entrySet().iterator(); iter.hasNext();) { Map.Entry entry = iter.next(); String key = String.valueOf(entry.getKey()); if (key.startsWith("xmlns:")) { String prefix = key.substring(6); String uri = String.valueOf(entry.getValue()); namespace(uri, prefix); iter.remove(); } } return super.invokeMethod(methodName, args); }
return super.invokeMethod(methodName, arg);