@Override
  public void replace(@NotNull PsiClass outerClass,
                      @NotNull PsiElementFactory elementFactory,
                      @NotNull PsiMethodCallExpression callExpression) {
    PsiElement parent = myExpression.getParent();
    if (parent instanceof PsiAssignmentExpression &&
        Objects.equals(myExpression, ((PsiAssignmentExpression)parent).getLExpression())) {
      grantUpdateAccess((PsiAssignmentExpression)parent, outerClass, callExpression, elementFactory);
    }
    else {
      grantReadAccess(outerClass, callExpression, elementFactory);
    }
  }
@Override
  public void replace(@NotNull PsiClass outerClass,
                      @NotNull PsiElementFactory elementFactory,
                      @NotNull PsiMethodCallExpression callExpression)