title: Referencing an instance of a given class in sequence diagrams
body: <p>I have to model a system where an object of the class <code>Person</code> will invoke the static method <code>getBook(...) : Book</code> on the class <code>Book</code> which will return an instance of a particular book.</p>
  
  <p><strong>How do you reference the book instance obtained by the operation?</strong></p>
  
  <p>As of now, I can think of two approaches, neither of which I have ever seen/used, which is why I am looking for the <em>correct</em> approach.</p>
  
  <p>The first approach is to invoke methods directly on the book instance obtained, e.g. if the reference returned by <code>getBook(...) : Book</code> is named <code>matchingBook</code>, I would use <code>matchingBook.doSomething(...)</code>, much like having a local variable.</p>
  
  <p>The second way, which I find more in the line of sequence diagrams is to let the book instance returned by the operation appear with its own lifeline, e.g. next to the Book class, and referencing it with an arrow labeled <code>doSomething(...)</code>.</p>
  
  <p>However, with the second approach, it is not that obvious that this object is in fact the one returned by the operation.</p>