public static void setMetaClass ( Object self , MetaClass metaClass ) { if ( metaClass instanceof HandleMetaClass ) metaClass = ( ( HandleMetaClass ) metaClass ) . getAdaptee ( ) ; if ( self instanceof Class ) { GroovySystem . getMetaClassRegistry ( ) . setMetaClass ( ( Class ) self , metaClass ) ; } else { ( ( MetaClassRegistryImpl ) GroovySystem . getMetaClassRegistry ( ) ) . setMetaClass ( self , metaClass ) ; } }
Set the metaclass for an object .