PsiType () { PsiFieldStub stub = getStub(); if (stub != null) { PsiType type = dereference(myCachedType); if (type == null) { type = JavaSharedImplUtil.createTypeFromStub(this, stub.getType()); myCachedType = new SoftReference<>(type); } return type; } myCachedType = null; PsiTypeElement typeElement = getTypeElement(); if (typeElement == null) { LOG.error("No type element found for field; children classes = " + StringUtil.join(getChildren(), e -> e.getClass().getName(), ", "), new Attachment("tree.txt", DebugUtil.psiTreeToString(this, true))); return PsiTypes.nullType(); } return JavaSharedImplUtil.getType(typeElement, getNameIdentifier()); }