@Override
    public void visitReferenceExpression(@NotNull PsiReferenceExpression expression) {
      super.visitReferenceExpression(expression);
      if (expression.getParent() instanceof PsiMethodCallExpression) {
        return;
      }
      final PsiExpression qualifier = expression.getQualifierExpression();
      if (qualifier == null) {
        return;
      }
      final PsiElement nameElement = expression.getReferenceNameElement();
      if (nameElement == null) {
        return;
      }
      if (violatesLawOfDemeter(qualifier)) {
        registerError(nameElement, Boolean.FALSE);
      }
    }
@Override
    public void visitReferenceExpression(@NotNull PsiReferenceExpression expression)