Analysis of source code - program available anywhere?

N

nileppez

I want something that will very quickly give me a list of the java
facilities a piece of source code I get from anywhere contains.

Really this is so I can see instantly what it is using in terms of
java technologies (ok what graphics classes for instance).

Is there anything like this available?

Maybe something like a quick self documentor. I don't want it to
address the programmers own classes just the Sun Libraries it uses.

Thankyou
 
D

David Zimmerman

nileppez said:
I want something that will very quickly give me a list of the java
facilities a piece of source code I get from anywhere contains.

Really this is so I can see instantly what it is using in terms of
java technologies (ok what graphics classes for instance).

There is nothing in a class reference that identifies it as a sun
provided one. There is nothing in a .class file that identifies it as a
suin provider either.

You can study the .class files inspecting the constant pool looking for
class references. Once you have that list, you'll have to figure out how
to tell a sun class from any other class. Package names should probably
get it at least 95% right. This will leave out dynamicaly loaded
classes, classes whose names are coded as string constants or read from
config files or from network partners.

Reading the constant pool isn't very difficult, building the list of sun
provided packages might be a little more difficult especially since that
list is added to constantly. Some heuristics will help. If the package
starts with 'java', 'javax', 'sun', or 'com.sun', it's probably a sun
provided class (are there exceptions?).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top