'How to get method names for Android listeners given a view?
I'm trying to write a function that returns method names for listeners with a view as input. Like List<String> getListeners(android.view.View view). I used reflection to get listeners, but it is hard to get the names somehow. For lambdas, I obtained the method names using .toString(), but for actual methods, .toString() only gives me the class name, and I cannot use reflection to further get fields that are visible to IntelliJ debugger.
For example, the listener object in IntelliJ debugger:

But reflection actually says this class has no such field

Can anyone tell me what can I do to get the method names in this situation?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
