Frank Hardisty
Frank Hardisty

Reputation: 133

Minimizing visibility in Java

Does anyone know of an automated approach to refactoring code to minimize the visibility of classes, and their properties and methods? I'm trying to clean up an old API that has way too many public getters and setters to fit with JavaBean standards. An Eclipse plugin would be ideal, but any tool that could help would be great.

Upvotes: 3

Views: 265

Answers (2)

Javamann
Javamann

Reputation: 2922

I use Structure101 to maintain the structure of my application. It's worth a look.

Upvotes: 1

krosenvold
krosenvold

Reputation: 77261

IntelliJ idea can do a global analysis of code and tell you about all kinds of excessive visibility issues. If there's any dynamic technologies involved, it's also quite good at understanding that they are usages of a given method/class; but it's not perfect.

Upvotes: 5

Related Questions