public void chooseMeta(MetaClassImpl mci){
  if (mci == null)   return;
  Object receiver=getCorrectedReceiver();
  Object[] newArgs=removeRealReceiver(args);
  if (receiver instanceof Class) {
    if (LOG_ENABLED)     LOG.info("receiver is a class");
    if (!mci.hasCustomStaticInvokeMethod())     method=mci.retrieveStaticMethod(name,newArgs);
  }
 else {
    String changedName=name;
    if (receiver instanceof GeneratedClosure && changedName.equals("call")) {
      changedName="doCall";
    }
    if (!mci.hasCustomInvokeMethod())     method=mci.getMethodWithCaching(selectionBase,changedName,newArgs,false);
  }
  if (LOG_ENABLED)   LOG.info("retrieved method from meta class: " + method);
}

public void chooseMeta ( MetaClassImpl mci ) { if ( mci == null ) return ; Object receiver = getCorrectedReceiver ( ) ; Object [ ] newArgs = removeRealReceiver ( args ) ; if ( receiver instanceof Class ) { if ( LOG_ENABLED ) LOG . info ( "receiver is a class" ) ; if ( ! mci . hasCustomStaticInvokeMethod ( ) ) method = mci . retrieveStaticMethod ( name , newArgs ) ; } else { String changedName = name ; if ( receiver instanceof GeneratedClosure && changedName . equals ( "call" ) ) { changedName = "doCall" ; } if ( ! mci . hasCustomInvokeMethod ( ) ) method = mci . getMethodWithCaching ( selectionBase , changedName , newArgs , false ) ; } if ( LOG_ENABLED ) LOG . info ( "retrieved method from meta class: " + method ) ; }
uses the meta class to get a meta method for a method call . there will be no meta method selected , if the meta class is no metaclassimpl or the meta class is an adaptingmetaclass .
