AstSpine () { AstSpine result = myStubbedSpine; if (result == null) { PsiFileImpl file = (PsiFileImpl)getPsi(); IStubFileElementType type = file.getElementTypeForStubBuilder(); if (type == null) return AstSpine.EMPTY_SPINE; result = RecursionManager.doPreventingRecursion(file, false, () -> new AstSpine(calcStubbedDescendants(type.getBuilder()))); if (result == null) { throw new StackOverflowPreventedException("Endless recursion prevented"); } myStubbedSpine = result; } return result; }