Missing links in the API documention

Here is an example of the first line of a basic macro for calc -

oSheet = ThisComponent.getSheets.getByIndex(0)

In the API documention, I see the method getByIndex is part of interface XIndexAccess and the method getSheets is part of interface XSpreadsheetDocument.

How would I know ThisComponent supports the method getSheets?

If I understand Interface XSpreadsheetDocument correctly, getSheets() returns an XSpreadsheets.

How would I know XSpreadsheets supports the method getByIndex?