@PsiModifier.ModifierConstant
  protected String getVisibility(PsiClass parentClass, @NotNull PsiClass targetClass) {
    if (parentClass != null && (parentClass.equals(targetClass) || PsiTreeUtil.isAncestor(targetClass, parentClass, true))) {
      return PsiModifier.PRIVATE;
    } else {
      return JavaCodeStyleSettings.getInstance(targetClass.getContainingFile()).VISIBILITY;
    }
  }
@PsiModifier.ModifierConstant
  protected String getVisibility(PsiClass parentClass, @NotNull PsiClass targetClass)