@Override public Number measure(final MetricData data, final Def_Function function) { final Counter c = new Counter(0); final Module myModule = function.getMyScope().getModuleScope(); function.accept(new ExternalFeatureEnvyDetector(myModule, c)); return c.val(); }
@Override public Number measure(final MetricData data, final Module module) { final Counter externalReferences = new Counter(0); final ExternalFeatureEnvyDetector detector = new ExternalFeatureEnvyDetector(module, externalReferences); module.accept(detector); return externalReferences.val(); }