public final @NotNull PsiElementRef<Child> createChildRef(@NotNull PsiElementRef<? extends Parent> parentRef) {
    final Parent parent = parentRef.getPsiElement();
    if (parent != null) {
      final Child existing = findLinkedChild(parent);
      if (existing != null) {
        return PsiElementRef.real(existing);
      }
    }
    return PsiElementRef.imaginary(parentRef, this);
  }
public final @NotNull PsiElementRef<Child> createChildRef(@NotNull PsiElementRef<? extends Parent> parentRef)