How detect method calls that are not already in 1.4

My program is compiled with JDK 1.5 or 1.6 and retroweaved to 1.4.

If I do not take care I may type

int i=65;

Character.isDigit(i);

instead of

Character.isDigit(char)i);

Without casting to char it uses a method that exists only since 1.5 but not

yet in 1.4.

There are a few other methods that had been added since 1.5

Their use leads to NoSuchMethodError on 1.4 clients.

Their usage must be avoided.

How can I recognize them at compile time?

Or has anybody written a tool to check all method calls

whether they already exist in 1.4 ?

If not I would write it myself and probably will use the javap output.

After reading through the docs of java.lang.reflect.Method I guess that

there is no flag telling when a method had been introduced.

[842 byte] By [christoa] at [2007-11-27 5:53:03]
# 1
there was some discussion on that here: http://forum.java.sun.com/thread.jspa?threadID=586602If you use ant, you could also try and configure the src and target properties of javac task: http://ant.apache.org/manual/CoreTasks/javac.htmlAlper
aakturea at 2007-7-12 15:45:28 > top of Java-index,Core,Monitoring & Management...