It is not really for onDestroy(). That was just an example.
If you remember, early this year we talked about an enhanced menu system with modifyable menus. My final solution was to modify the generated Java code within a #CustomBuildAction.
I just thought if I can do the same with my own Activity class. Main problems seems to be how to raise events from the superclass.