Your code is presented in the following class diagram:

It represents the relationship between classes:
Implementation implements ICallbackImplementation depends on AnotherImplementation (it creates one in its constructor)AnotherImplementation has an ICallback (named mCallback)
The class diagram does not represent the functionality of the method. The functionality of the method is visualized using a sequence or collaboration diagram.
In your example, the sequence diagram for testFucntion() very simple:

Note that the Implementation class does not appear in the sequence diagram. This is because the mCallback element mCallback declared as ICallback . This may be all that implements the ICallback interface.
I think the more interesting question is how to render the method that calls the callback. You do not specify which Implementation method calls testFunction() AnotherImplementation , so I assume this happens inside the Implementation constructor. I created the following sequence diagram for this constructor:

Here you can see:
Implementation creates AnotherImplementationImplementation calls testFunction on AnotherImplementationAnotherImplementation calls informFunction on Implementation
nakosspy
source share