Seems this doesn't handle every case well.

For example anonymous class:

```java
anything.addListener(new SomeAdapter() {
    //...
});
```