String (@NotNull PsiPatternVariable variable) { String text = JavaPsiPatternUtil.getEffectiveInitializerText(variable); if (text == null) { return null; } text = variable.getTypeElement().getText() + " " + variable.getName() + " = " + text + ";"; PsiModifierList modifierList = variable.getModifierList(); if (modifierList != null && StringUtil.isNotEmpty(modifierList.getText())) { text = modifierList.getText() + " " + text; } return text; }