/** * A helper method to allow GPathResults to work with subscript operators * @param index an index * @param newValue the value to put at the given index */ public void putAt(final int index, final Object newValue) { final GPathResult result = (GPathResult)getAt(index); if (newValue instanceof Closure) { result.replaceNode((Closure)newValue); } else { result.replaceBody(newValue); } }
public void doCall(Object[] args) { final GroovyObject delegate = (GroovyObject)getDelegate(); final GPathResult thisObject = (GPathResult)getThisObject(); Node node = (Node)thisObject.getAt(0); List children = node.children(); for (Object child : children) { delegate.getProperty("mkp"); if (child instanceof Node) { delegate.invokeMethod("yield", new Object[]{new NodeChild((Node) child, thisObject, "*", null)}); } else { delegate.invokeMethod("yield", new Object[]{child}); } } } };
public void putAt(final int index, final Object newValue) { final GPathResult result = (GPathResult)getAt(index); if (newValue instanceof Closure) { result.replaceNode((Closure)newValue); } else { result.replaceBody(newValue); } }
public void putAt(final int index, final Object newValue) { final GPathResult result = (GPathResult)getAt(index); if (newValue instanceof Closure) { result.replaceNode((Closure)newValue); } else { result.replaceBody(newValue); } }
/** * A helper method to allow GPathResults to work with subscript operators * @param index an index * @param newValue the value to put at the given index */ public void putAt(final int index, final Object newValue) { final GPathResult result = (GPathResult)getAt(index); if (newValue instanceof Closure) { result.replaceNode((Closure)newValue); } else { result.replaceBody(newValue); } }
public void putAt(final int index, final Object newValue) { final GPathResult result = (GPathResult)getAt(index); if (newValue instanceof Closure) { result.replaceNode((Closure)newValue); } else { result.replaceBody(newValue); } }
public void putAt(final int index, final Object newValue) { final GPathResult result = (GPathResult)getAt(index); if (newValue instanceof Closure) { result.replaceNode((Closure)newValue); } else { result.replaceBody(newValue); } }
public void doCall(Object[] args) { final GroovyObject delegate = (GroovyObject)getDelegate(); final GPathResult thisObject = (GPathResult)getThisObject(); Node node = (Node)thisObject.getAt(0); List children = node.children(); for(int i=0; i<children.size(); i++){ Object child = children.get(i); delegate.getProperty("mkp"); if(child instanceof Node){ delegate.invokeMethod("yield", new Object[]{new NodeChild((Node)child, thisObject,"*",null)}); } else{ delegate.invokeMethod("yield", new Object[]{child}); } } } };
public void doCall(Object[] args) { final GroovyObject delegate = (GroovyObject)getDelegate(); final GPathResult thisObject = (GPathResult)getThisObject(); Node node = (Node)thisObject.getAt(0); List children = node.children(); for(int i=0; i<children.size(); i++){ Object child = children.get(i); delegate.getProperty("mkp"); if(child instanceof Node){ delegate.invokeMethod("yield", new Object[]{new NodeChild((Node)child, thisObject,"*",null)}); } else{ delegate.invokeMethod("yield", new Object[]{child}); } } } };
public void doCall(Object[] args) { final GroovyObject delegate = (GroovyObject)getDelegate(); final GPathResult thisObject = (GPathResult)getThisObject(); Node node = (Node)thisObject.getAt(0); List children = node.children(); for(int i=0; i<children.size(); i++){ Object child = children.get(i); delegate.getProperty("mkp"); if(child instanceof Node){ delegate.invokeMethod("yield", new Object[]{new NodeChild((Node)child, thisObject,"*",null)}); } else{ delegate.invokeMethod("yield", new Object[]{child}); } } } };
public void doCall(Object[] args) { final GroovyObject delegate = (GroovyObject)getDelegate(); final GPathResult thisObject = (GPathResult)getThisObject(); Node node = (Node)thisObject.getAt(0); List children = node.children(); for (Object child : children) { delegate.getProperty("mkp"); if (child instanceof Node) { delegate.invokeMethod("yield", new Object[]{new NodeChild((Node) child, thisObject, "*", null)}); } else { delegate.invokeMethod("yield", new Object[]{child}); } } } };
public void doCall(Object[] args) { final GroovyObject delegate = (GroovyObject)getDelegate(); final GPathResult thisObject = (GPathResult)getThisObject(); Node node = (Node)thisObject.getAt(0); List children = node.children(); for (Object child : children) { delegate.getProperty("mkp"); if (child instanceof Node) { delegate.invokeMethod("yield", new Object[]{new NodeChild((Node) child, thisObject, "*", null)}); } else { delegate.invokeMethod("yield", new Object[]{child}); } } } };