/** * Stores a configured child element within its parent object. * * @param project Project containing the objects. * May be <code>null</code>. * @param parent Parent object to add child to. * Must not be <code>null</code>. * @param child Child object to store in parent. * Should not be <code>null</code>. * @param tag Name of element which generated the child. * May be <code>null</code>, in which case * the child is not stored. */ public static void storeChild(Project project, Object parent, Object child, String tag) { IntrospectionHelper ih = IntrospectionHelper.getHelper(project, parent.getClass()); ih.storeElement(project, parent, child, tag); }
/** * Copies the properties into the Ant task. */ public void configure(Object antObject) { IntrospectionHelper ih = IntrospectionHelper.getHelper(antObject.getClass()); // set attributes first for (Iterator itr = attributes.entrySet().iterator(); itr.hasNext();) { Entry att = (Entry)itr.next(); ih.setAttribute(getProject(), antObject, (String)att.getKey(), (String)att.getValue()); } // then nested elements for (Iterator itr = elements.iterator(); itr.hasNext();) { AntElement e = (AntElement) itr.next(); Object child = ih.createElement(getProject(), antObject, e.name); e.configure(child); ih.storeElement(getProject(), antObject, child, e.name); } } }
/** * Copies the properties into the Ant task. */ public void configure(Object antObject) { IntrospectionHelper ih = IntrospectionHelper.getHelper(antObject.getClass()); // set attributes first for (Iterator itr = attributes.entrySet().iterator(); itr.hasNext();) { Entry att = (Entry)itr.next(); ih.setAttribute(getProject(), antObject, (String)att.getKey(), (String)att.getValue()); } // then nested elements for (Iterator itr = elements.iterator(); itr.hasNext();) { AntElement e = (AntElement) itr.next(); Object child = ih.createElement(getProject(), antObject, e.name); e.configure(child); ih.storeElement(getProject(), antObject, child, e.name); } } }
/** * Copies the properties into the Ant task. */ public void configure(Object antObject) { IntrospectionHelper ih = IntrospectionHelper.getHelper(antObject.getClass()); // set attributes first for (Iterator itr = attributes.entrySet().iterator(); itr.hasNext();) { Entry att = (Entry)itr.next(); ih.setAttribute(getProject(), antObject, (String)att.getKey(), (String)att.getValue()); } // then nested elements for (Iterator itr = elements.iterator(); itr.hasNext();) { AntElement e = (AntElement) itr.next(); Object child = ih.createElement(getProject(), antObject, e.name); e.configure(child); ih.storeElement(getProject(), antObject, child, e.name); } } }