private static MetaClassImpl getMetaClassImpl(MetaClass mc, boolean includeEMC) {
        Class mcc = mc.getClass();
        boolean valid = mcc == MetaClassImpl.class ||
                         mcc == AdaptingMetaClass.class ||
                         mcc == ClosureMetaClass.class ||
                         (includeEMC && mcc == ExpandoMetaClass.class);
        if (!valid) {
            if (LOG_ENABLED) LOG.info("meta class is neither MetaClassImpl, nor AdoptingMetaClass, nor ClosureMetaClass, normal method selection path disabled.");
            return null;
        }
        if (LOG_ENABLED) LOG.info("meta class is a recognized MetaClassImpl");
        return (MetaClassImpl) mc;
    }
private static MetaClassImpl getMetaClassImpl ( MetaClass mc , boolean includeEMC ) { Class mcc = mc . getClass ( ) ; boolean valid = mcc == MetaClassImpl . class || mcc == AdaptingMetaClass . class || mcc == ClosureMetaClass . class || ( includeEMC && mcc == ExpandoMetaClass . class ) ; if ( ! valid ) { if ( LOG_ENABLED ) LOG . info ( "meta class is neither MetaClassImpl, nor AdoptingMetaClass, nor ClosureMetaClass, normal method selection path disabled." ) ; return null ; } if ( LOG_ENABLED ) LOG . info ( "meta class is a recognized MetaClassImpl" ) ; return ( MetaClassImpl ) mc ; }
Returns the MetaClassImpl if the given MetaClass is one of
MetaClassImpl, AdaptingMetaClass or ClosureMetaClass. If
none of these cases matches, this method returns null.