GeeCON Prague 2014*
The moose likes Beginning Java and the fly likes how many instance variable and methods? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Bookmark "how many instance variable and methods?" Watch "how many instance variable and methods?" New topic
Author

how many instance variable and methods?

kshitij kaushik
Greenhorn

Joined: Jan 14, 2009
Posts: 11
guys suppose I make an application having thirty or more classes.....and after some months I want to update something in that application......how can I know that how many & what are the instance variable and methods a particular class have....


thanx
kshitij
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

how can I know that how many & what are the instance variable and methods a particular class have....

If you made the application, you have the source code, haven't you ?


[My Blog]
All roads lead to JavaRanch
kshitij kaushik
Greenhorn

Joined: Jan 14, 2009
Posts: 11
ya I have..... but do I need to check whole application again to see how many Instance variable and methods a particular class have....while just by the name of class, I know that I need to update this particular class only....isn't a wasting of time to see whole application again to just update a single class...This is a hypothetical condition, am asking....
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

Sorry, I'm still unsure what you're asking for. I guess you're talking about refactoring a class. Modern IDEs allow you to rename or move instance fields, and automatically check and update places where the refactored entity is being used. These IDEs also allow to look where a particular variable or method is used in the whole project.
kshitij kaushik
Greenhorn

Joined: Jan 14, 2009
Posts: 11
suppose their is a application having so many classes(let it be 30). having lots of interface classes and a superclass...now say class 28 is very specific in its work.......this class 28 can have some methods and instance variable from its superclasses and interfaces together with its own.....now I want to update little bit in this class 28......but since we are not sure what are the instance variable and methods it is inheriting from whole design we are susceptible to make mistake any time in updating that.......So mine question is that can some how we can know what are the methods and instance variable this class 28 is inheriting.......so that we would sure in updating class 28 that we are not making any mistake and it will helpful too at the same time.....
hope you got mine point....
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3833

kshitij kaushik wrote: ...but since we are not sure what are the instance variable and methods it is inheriting from whole design we are susceptible to make mistake any time in updating that.......So mine question is that can some how we can know what are the methods and instance variable this class 28 is inheriting.......


How about generating javadoc for the application? Thats an additional work,but which will give you the methods/feilds etc... in detail.


SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
Use a good IDE. Netbeans, Eclipse, IntelliJ, JBuilder, JDeveloper are quite helpful in navigating a project.
sujith Acharya
Ranch Hand

Joined: Dec 25, 2006
Posts: 60
Give meaningful names to the classes, methods and instances (Use java naming standards) , so that from that name itself you can figure it out what is the purpose of the perticular class, and what the method does etc. Also I think, it would be good to maintain a developer guide , which gives some idea to other coders to understand the code.
kshitij kaushik
Greenhorn

Joined: Jan 14, 2009
Posts: 11
ok guys.........thanks a lot to all of you for your valuable suggestions........
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how many instance variable and methods?