@ SuppressWarnings ( "unchecked" ) public Closure < V > dehydrate ( ) { Closure < V > result = ( Closure < V > ) this . clone ( ) ; result . delegate = null ; result . owner = null ; result . thisObject = null ; return result ; }
Returns a copy of this closure where the owner delegate and thisObject fields are null allowing proper serialization when one of them is not serializable .