'How to use Kotlin to inspect all calls of a particular function?
In our codebase we have a third-party library method that behaves in an unexpected manner when you pass null to it. To help prevent misuse of the method, I would like to write a test that walks through the codebase, finds all calls to the method, and makes sure the type of the single parameter passed in is not nullable.
Is this possible using Kotlin reflection? Is this possible in Kotlin at all? I can get to the point where I list out all the functions in the codebase, but am stumped on how to continue!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
