Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Newbie Question: How to work with java class

Status
Not open for further replies.

awolff01

Programmer
Jun 17, 2003
55
US
Pardon if this question is completely ridiculous.

There is a particular java class sitting on a server at work I need to learn how to use. Is their anyway of generically calling this java class to learns about its methods, functions etc.

The developer of the java class provided no documentation and I know very little about java

Thanks.
 
Hi,
If you could access the java class, you can decompile using a decompiler (Decafe, Jad to name a few) and could see the methods and variables. If you dont have access then you can use java.lang.reflect package to get the details about the class (java.lang.reflect.Constructor, java.lang.reflect.Method etc...). Hope this would help you..

cheers,
Shanmy
 
Better yet learn about Reflection which will give you a full list of its methods etc.
 
Reflection will provide you with the "interface" so to speak, but if the class is large, without documentation you might have trouble gaining any context.

It is certainly the place to start but if you can't derive enough meaning from that you would be forced to decompile and try to learn from the generated source code what the intention and use model is.

-pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top