private @Nullable PatternEvaluator createPatternEvaluator(@Nullable PsiPattern pattern) {
      PsiType type = JavaPsiPatternUtil.getPatternType(pattern);
      if (type == null) {
        return null;
      }
      SyntheticVariableEvaluator variableEvaluator;
      PsiPatternVariable variable = JavaPsiPatternUtil.getPatternVariable(pattern);
      if (variable != null) {
        String variableName = variable.getName();
        myCurrentFragmentEvaluator.setInitialValue(variableName, null);
        variableEvaluator = new SyntheticVariableEvaluator(myCurrentFragmentEvaluator, variableName, null);
      }
      else {
        variableEvaluator = null;
      }
      if (pattern instanceof PsiDeconstructionPattern) {
        PsiClass recordClass = PsiUtil.resolveClassInClassTypeOnly(type);
        if (recordClass == null) {
          throw evaluateException(JavaDebuggerBundle.message("evaluation.error.unknown.type", type.getCanonicalText()));
        }
        if (!recordClass.isRecord()) {
          throw evaluateException(JavaErrorBundle.message("deconstruction.pattern.requires.record", JavaHighlightUtil.formatType(type)));
        }
        List<PatternEvaluator> componentEvaluators = new ArrayList<>();
        PsiPattern[] components = ((PsiDeconstructionPattern)pattern).getDeconstructionList().getDeconstructionComponents();
        for (PsiPattern component : components) {
          componentEvaluators.add(createPatternEvaluator(component));
        }
        TypeEvaluator typeEvaluator = new TypeEvaluator(JVMNameUtil.getJVMQualifiedName(recordClass));
        List<String> recordComponentNames = ContainerUtil.map(recordClass.getRecordComponents(), PsiRecordComponent::getName);
        return new DeconstructionPatternEvaluator(typeEvaluator, variableEvaluator, componentEvaluators, recordComponentNames);
      }
      if (type instanceof PsiPrimitiveType) {
        return new PatternEvaluator(type.getCanonicalText(), variableEvaluator);
      }
      return new PatternEvaluator(new TypeEvaluator(JVMNameUtil.getJVMQualifiedName(type)), variableEvaluator);
    }
private @Nullable PatternEvaluator createPatternEvaluator(@Nullable PsiPattern pattern)