@NotNull
  @Override
  public PsiElementVisitor buildVisitor(@NotNull ProblemsHolder holder, boolean isOnTheFly) {
    if (!PsiUtil.isLanguageLevel8OrHigher(holder.getFile())) return PsiElementVisitor.EMPTY_VISITOR;
    return new JavaElementVisitor() {
      @Override
      public void visitTypeCastExpression(@NotNull PsiTypeCastExpression expression) {
        HashCodeModel model = getHashCodeModel(expression);
        if (model != null) {
          PsiClass containingClass = PsiUtil.getContainingClass(expression);
          if (containingClass != null && containingClass.getQualifiedName() != null &&
              containingClass.getQualifiedName().startsWith("java.lang.")) {
            // Avoid suggesting inside JDK sources
            return;
          }
          holder.registerProblem(expression,
                                 JavaAnalysisBundle.message("inspection.can.be.replaced.with.message", model.type + ".hashCode()"),
                                 new ReplaceWithLongHashCodeFix(model.type));
        }
      }
    };
  }
@NotNull
  @Override
  public PsiElementVisitor buildVisitor(@NotNull ProblemsHolder holder, boolean isOnTheFly)