Is it possible to 'Swizzle' Java classes for Android?

734 Views Asked by At

Method swizzling in iOS allows the developer to change the implementation of a type of class at run time. For example, instead of adding code to every view controller, swizzling allows one method to be written, and every view controller will use that method. Is there anything that would result in the same effect when writing code for Android? Write one method that every Activity can use, without having to paste the method into every activity?

For more information on the definition of method swizzling see: http://nshipster.com/method-swizzling/

0

There are 0 best solutions below