PsiTypeElement (GrTypeElement typeElement) { if (typeElement == null) return null; final SoftReference<PsiTypeElement> ref = typeElement.getUserData(PSI_TYPE_ELEMENT); final PsiTypeElement element = dereference(ref); if (element != null) return element; final GrSyntheticTypeElement newTypeElement = new GrSyntheticTypeElement(typeElement); typeElement.putUserData(PSI_TYPE_ELEMENT, new SoftReference<>(newTypeElement)); return newTypeElement; }