boolean (RefJavaElement listOwner, final String acceptedVisibility) { if (acceptedVisibility != null) { while (listOwner != null) { if (VisibilityUtil.compare(listOwner.getAccessModifier(), acceptedVisibility) >= 0) { return true; } final RefEntity parent = listOwner.getOwner(); if (parent instanceof RefJavaElement) { listOwner = (RefJavaElement)parent; } else { break; } } } return false; }