Meaningless Drivel is fun!*
The moose likes Beginning Java and the fly likes Determining which public methods can be made private Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Determining which public methods can be made private" Watch "Determining which public methods can be made private" New topic
Author

Determining which public methods can be made private

Hedley Finger
Greenhorn

Joined: Sep 20, 2007
Posts: 12
Our lecturer and tutor encourage us to make all our methods public initially, just so we can test them interactively (very easy to do in the BlueJ educational IDE). But, when everything is working well, we are expected to make public methods private if they are not called from other classes.

It can be quite a chore if you have a lot of classes with many fields, and setters and getters largely there to help set up tests. Does anybody know of a workaround, utility or plug-in that will list all methods not called from any class other than their home class?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60774
    
  65

Please do not cross-post the same question in multiple forums. It wastes people's time when multiple redundant conversations take place.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
wood burning stoves
 
subject: Determining which public methods can be made private
 
Similar Threads
Thread class
Locating which public methods can be made private
Encapsulation & Information Hiding and Inheritence
Determining which public methods can be made private
OO Concepts - Encapsulation, Cohesion, Coupling