RefParameter (UParameter param, int index, RefElement refElement) { LOG.assertTrue(myRefManager.isValidPointForReference(), "References may become invalid after process is finished"); PsiElement sourcePsi = param.getSourcePsi(); LOG.assertTrue(sourcePsi != null, "UParameter " + param + " has null sourcePsi"); RefElement result = myRefManager.getFromRefTableOrCache(sourcePsi, () -> { RefParameterImpl ref = new RefParameterImpl(param, sourcePsi, index, myRefManager, refElement); ref.initializeIfNeeded(); return (RefElement)ref; }); return result instanceof RefParameter ? (RefParameter)result : null; }