private void installMetaClassCreationHandle(){
  try {
    final Class customMetaClassHandle=Class.forName("groovy.runtime.metaclass.CustomMetaClassCreationHandle");
    final Constructor customMetaClassHandleConstructor=customMetaClassHandle.getConstructor(new Class[]{});
    this.metaClassCreationHandle=(MetaClassCreationHandle)customMetaClassHandleConstructor.newInstance();
  }
 catch (  final ClassNotFoundException e) {
    this.metaClassCreationHandle=new MetaClassCreationHandle();
  }
catch (  final Exception e) {
    throw new GroovyRuntimeException("Could not instantiate custom Metaclass creation handle: " + e,e);
  }
}

private void installMetaClassCreationHandle ( ) { try { final Class customMetaClassHandle = Class . forName ( "groovy.runtime.metaclass.CustomMetaClassCreationHandle" ) ; final Constructor customMetaClassHandleConstructor = customMetaClassHandle . getConstructor ( new Class [ ] { } ) ; this . metaClassCreationHandle = ( MetaClassCreationHandle ) customMetaClassHandleConstructor . newInstance ( ) ; } catch ( final ClassNotFoundException e ) { this . metaClassCreationHandle = new MetaClassCreationHandle ( ) ; } catch ( final Exception e ) { throw new GroovyRuntimeException ( "Could not instantiate custom Metaclass creation handle: " + e , e ) ; } }
looks for a class called ' groovy . runtime . metaclass . custommetaclasscreationhandle ' and if it exists uses it as the metaclasscreationhandle otherwise uses the default
