/** * Apply a method on a object with the value found in the XML element If the * element is null, the method does nothing. * * @param e * @param o * @param method * @return * @throws SecurityException * @throws NoSuchMethodException * @throws IllegalArgumentException * @throws IllegalAccessException * @throws InvocationTargetException * @throws InstantiationException */ public boolean setMethod(JrdsElement e, Object o, String method) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException { return setMethod(e, o, method, String.class); }
/** * Apply a method on a object with the value found in a collection of XML * elements If the element is null, the method does nothing. * * @param e * @param o * @param method * @param argType * @return true if a least one set method succed * @throws SecurityException * @throws NoSuchMethodException * @throws IllegalArgumentException * @throws IllegalAccessException * @throws InvocationTargetException * @throws InstantiationException */ public boolean setMethod(Iterable<JrdsElement> e, Object o, String method, Class<?> argType) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException { if(e == null) return false; boolean setted = false; for(JrdsElement elem: e) { setted |= setMethod(elem, o, method, argType); } return setted; }