Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Traverse and edit Java Files automatically

 
yusuf Kaplan
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I need an API for traversing and editing Java files.
For example, I want to programmatically walk through a bunch of Java files in a directory and If I find a specific attribute or method within a Java file, then I want to remove or edit this attribute or method. I dont want to do it with BufferedReader and -Writer. Is there maybe any known libraries to help here?

Cheers,
Y
 
Stephan van Hulst
Bartender
Posts: 5329
48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why do you want to edit Java files like that?
 
Roberto Perillo
Bartender
Posts: 2271
3
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is pretty likely that such thing would just cause compile-time errors, since supposedly the files would still be compiled after that...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic