I have a large non static JAVA function, which uses this reference at several places inside it. I want to convert it to static function and pass "this" reference as a parameter, so that I can take it to utility class.
Is there any tool which can automate this process?
UPDATE: Please share if some one has his own quick way of doing this(without using any tool).
Let the method
myMethodreside in the classFoo, and you need to make it static in the classUtil.private Foo foo;inUtil.myMethod, chooseUtilas the target.staticmodifier to the moved method and fix the accesses to the addedFoo foo's internals.private Foo foo;fromUtil.