How to Read Java File Structure using Java?

Posted by Iso on Stack Overflow See other posts from Stack Overflow or by Iso
Published on 2010-04-13T23:12:29Z Indexed on 2010/04/13 23:23 UTC
Read the original article Hit count: 373

Filed under:
|
|

Hi,

I'm trying to read a java file and display in console the package, class and method name. something like this:

File: Test.java

package tspec.test;

public class Test {
   public void addTest () {}
   public void deleteTest () {}
}

Output:

package name: tspec.test
class name: Test
method name:
addTest
deleteTest

Thanks in advance :)

© Stack Overflow or respective owner

Related posts about java

Related posts about read