dimanche 21 août 2016

Changing Class name, method name and exporting it

Hello I was hoping someone here can help me accomplish this task. I want to change the name of all my field, methods and class in a package (doing it one class at a time will also be fine). I know that even with Java Reflection I won't be able to change it outside the class.

My sample java class :

public class Foo {

    private final Object foo = ...
    private Object foo1 = ...

    private void foo(){
       Object foo;
    }

}

The generated class should become :

public class A{

    private final Object a= ...
    private Object b = ...

    private void a(){
       Object a; //if possible
    }

}

It would be great if someone can tell me or give me the code to achieve this, if this can be done on any other language it will also be great. This will obviously be done at the last resort and will only be done to classes that are not activity or, service or any other android file which are referenced outside the package.





Aucun commentaire:

Enregistrer un commentaire