lundi 10 août 2020

Get method as a file from .java file

I have a .java file in a folder. I want to get all the methods and every method as a separate file.

class Foo{
public void add(int a, int b){ System.out.println(a+b);}
private int sub(int a, int b,int c){ return a-b;}}

In my program, I want to get all the methods add , sub as separate two files. I know this for .class file.we can achieve it using Reflection, but is it possible for .java file?





Aucun commentaire:

Enregistrer un commentaire