File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Performance and the fly likes Methods in a Java file Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Performance
Reply Bookmark "Methods in a Java file" Watch "Methods in a Java file" New topic
Author

Methods in a Java file

Ananth Ram
Greenhorn

Joined: Dec 07, 2001
Posts: 12
Hi,
I wanted to run a java program and see the affected methods in an output file. I have tried with Jinsight, etc all gives the intermediate files for viewing it, i wanted to see in a text file output, so that i can chase the impacted methods in a program.
Thanks
Dhamodharan Krishnan
Greenhorn

Joined: Nov 07, 2001
Posts: 23
You can use FileWriter object.
Using that you can
FileWriter fw = new FileWriter("out.log");
fw.write()--> in all the methods.
Then you will get at the end of running the program the output.
If you want to use without putting these then sorry.


Dhamodharan Krishnan,<br />Sun Microsystems, Bangalore<br />Direct : 91-80-4184 7247<br />Cell : 91-99 80 147 600
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 23628

You can use AspectJ to do this. AspectJ "automatically" inserts code at compile time according to the rules you specify.
You can specify a generic rule to have all methods output their names at runtime.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Certs: SCEA Part 1, Part 2 & 3 & Core Spring 3, OCAJP
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Or you use the inbuild profiler of the sun JDK: http://developer.java.sun.com/developer/onlineTraining/Programming/JDCBook/perf3.html


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
 
IntelliJ Java IDE
 
subject: Methods in a Java file
 
Threads others viewed
Runtime getRuntime() exec(String command) - How does this work?
Running DOS commands from java file
Help with running my first program.
Installing JDK in Windows 7
Reading .properties File From Action Form
developer file tools

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture