samedi 10 février 2018

Java get method variable counts with reflection

I want to get number of variables or lines used in my method , i and i dont know how!

like this:

public void test(){

   String a;
   int b;
   String c;

   //Custom comment.
 }

number of variables: 3 number of lines : 6

i just one of them.





Aucun commentaire:

Enregistrer un commentaire