• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

how many instance variable and methods?

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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....
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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 ?
 
kshitij kaushik
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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....
 
Bartender
Posts: 4109
72
Hibernate Fedora Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Use a good IDE. Netbeans, Eclipse, IntelliJ, JBuilder, JDeveloper are quite helpful in navigating a project.
 
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ok guys.........thanks a lot to all of you for your valuable suggestions........
 
Always look on the bright side of life. At least this ad is really tiny:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic