@ Deprecated public static void ensureCorrectGroovyMetaClass ( Object target , Class < ? > persistentClass ) { if ( target instanceof GroovyObject ) { GroovyObject go = ( ( GroovyObject ) target ) ; if ( ! go . getMetaClass ( ) . getTheClass ( ) . equals ( persistentClass ) ) { go . setMetaClass ( GroovySystem . getMetaClassRegistry ( ) . getMetaClass ( persistentClass ) ) ; } } }
Ensures the meta class is correct for a given class