public Closure getBody ( ) { return new Closure ( this . parent , this ) { 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 } ) ; } } } } ; }
Creates a Closure representing the body of this GPathResult .