More of a note to myself really. Anonymous classes in Java are subclasses. For whatever reason I’d led myself to believe that anonymous classes in Java are unnamed instances of classes, but they are not, they are subclasses.
this.getClass().getSimpleName() returns empty string for anonymous classes, but that doesn’t mean you can’t ever know the class name the anonymous class was created from. All you need to do is: this.getClass().getSuperclass().getSimpleName();
https://iqakruyprf.wordpress.com
https://iqakruyprf.wordpress.com
https://iqakruyprf.wordpress.com
https://dgaiyziytk.wordpress.com
https://dgaiyziytk.wordpress.com
https://hrjcdfdcvj.wordpress.com
https://hrjcdfdcvj.wordpress.com
https://wryxvrrhxe.wordpress.com
https://wryxvrrhxe.wordpress.com
https://wryxvrrhxe.wordpress.com