Sequence Diagram question

Hi guys…I hope you can help me with this, let me know if you new more details.

I am having an issue in my design.
I am trying to diagram current process.

Here is the code that i am having problems with (simple version).

Class A {

B b = new B();
b.getC().search().

}

So in the example below i have 3 objects A, B and C.
as you can see C is accessed form A using B.

When I create a Seq Diagram how do I depict search() function?
Do i send a msg from A -------> C
or do i show that A ---->B-----> C

Since function search is called form A, using B. I am leaning more towards the first option, but then i don’t know how to depict C??

Thank you for you help.

As the message is sent from A to C,
A—>C
is the right option. B in this case is only needed to access the C-instance to use.
If you want to be verbose and include B in your diagram, then you could do something like


A          B        C
!  getC    !        !
!--------->!        !
!          !        !
!  search  !        !
!------------------>!
!          !        !

Greetings,
Frank