@Override
    void processNew(JavaParameterInfo info, List<PatternWrapper> result) {
      PsiType newType = info.createType(myParent);
      if (newType != null) {
        String patternText = newType.getCanonicalText() + " " + info.getName();
        PsiExpression expression = myFactory.createExpressionFromText("x instanceof " + patternText, null);
        if (!(expression instanceof PsiInstanceOfExpression instanceOfExpression)) {
          throw new IncorrectOperationException(patternText + " is not a valid pattern");
        }
        PsiPattern pattern = instanceOfExpression.getPattern();
        result.add(new PatternWrapper(Objects.requireNonNull(pattern)));
      }
    }
@Override
    void processNew(JavaParameterInfo info, List<PatternWrapper> result)