use of org.codehaus.groovy.runtime.metaclass.ClosureMetaClass in project groovy by apache.
the class Selector method getMetaClassImpl.
/**
* Returns the MetaClassImpl if the given MetaClass is one of
* MetaClassImpl, AdaptingMetaClass or ClosureMetaClass. If
* none of these cases matches, this method returns null.
*/
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;
}
use of org.codehaus.groovy.runtime.metaclass.ClosureMetaClass in project groovy-core by groovy.
the class Selector method getMetaClassImpl.
/**
* Returns the MetaClassImpl if the given MetaClass is one of
* MetaClassImpl, AdaptingMetaClass or ClosureMetaClass. If
* none of these cases matches, this method returns null.
*/
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;
}
Aggregations