String (@NotNull LighterASTNode var, int arrayDepth) { LighterASTNode typeNode = LightTreeUtil.firstChildOfType(myTree, var, TYPE); while (arrayDepth > 0) { LighterASTNode bracket = LightTreeUtil.firstChildOfType(myTree, typeNode, JavaTokenType.LBRACKET); if (bracket == null) return null; typeNode = LightTreeUtil.firstChildOfType(myTree, typeNode, TYPE); arrayDepth--; } LighterASTNode typeRef = LightTreeUtil.firstChildOfType(myTree, typeNode, JAVA_CODE_REFERENCE); String refName = JavaLightTreeUtil.getNameIdentifierText(myTree, typeRef); if (refName == null) return null; if (LightTreeUtil.firstChildOfType(myTree, typeRef, JAVA_CODE_REFERENCE) != null) return refName; if (isTypeParameter(refName, var)) return null; return refName; }