GrVariable (@NotNull GrStatement statement) { if (!(statement instanceof GrVariableDeclaration variableDeclaration)) return null; final GrVariable[] variables = variableDeclaration.getVariables(); GrVariable var = null; if (variables.length == 1) { var = variables[0]; } if (var instanceof GrParameter || var instanceof GrField) { return null; } return var; }