View <-- MyView
to View <-- DebugView <-- MyView
You might even be able to do this without decompiling the code.So, when you write an android app, most of time you describe your ui's layout in xml files. This xml is then translated to a binary blob during the compilation (you don't have to know/care about this intermediary format though). When you need the corresponding ui, you use a layoutInflater in order to 'inflate' the xml : read its content and create the corresponding views.
One nifty trick is that since the LayoutInflater instantiate the views, it is the perfect place to replace a view by another. For example, that's how the support lib works (well, modulo some hacks, the layoutInflater was not thought out for this initially). When you ask for an ImageView in your xml, the support lib provides you with an AppCompatImageView instead, adding some new capabilities independently of the OS version.
probe goes a little bit further and dynamically add some methods to any class that it inflates, in order to add some layout debugging capabilities.