int (RefOverridable refClass) { int count = 0; for (RefOverridable reference : refClass.getDerivedReferences()) { if (reference instanceof RefClass) { if (!((RefClass)reference).isInterface() && !((RefClass)reference).isAbstract()) { count++; } count += getImplementationsCount(reference); } else if (reference instanceof RefFunctionalExpression) { count++; } } return count; }