[plug] Save a soul from scripting insanity...

Bernard Blackham bernard at blackham.com.au
Wed Aug 14 19:05:38 WST 2002


On Tue, Aug 13, 2002 at 11:38:11AM +0800, Russell Keith-Magee wrote:
> I have a large number of Java source files, which contain a large number of
> function calls to a translation engine:
> 
> 	Translator.translate("Foobar");

Is it possible to mock up your own class instance called Translator,
with a method translate written for 1, 2, 3, 4 or however many
parameters you need, and just compile the java source files?

This'll fail if the code uses other classes that you're missing, but
if you know all your source files use only Translator and some
standard java, then this will be the most reliable method, as you
let the Java compiler do the parsing.

I may be missing some vital fact that doesn't let you do this, but
I'm certain its possible. Even with a meld of this, and some
awk/sed/perl scripts to filter out other cruft.

Regards,

Bernard.

-- 
 Bernard Blackham
 bernard at blackham.com.au
 Australian Linux Technical Conference 2003: http://www.linux.conf.au/



More information about the plug mailing list