ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "J.Pietschmann" <>
Subject Testing for an abstract method
Date Tue, 13 May 2003 20:46:01 GMT
Hi all,
over at FOP we have an odd requirement: We are subclassing an
AWT class which got an abstract method added in JDK 1.4.
Unfortunately, the return value class exists in JDK 1.4 only
too, so that generally adding a dummy method still wouldn't
compile on JDK 1.3. The current solutions is to check for
JDK 1.4 presence by checking for java.lang.CharSequence and
conditionally substitute some text.
I'd rather like to test whether java.awt.GraphicsConfiguration
has a method createCompatibleVolatileImage(int, int), which is
harder to fool by adding a jar with some JDK 1.4 components to
a JDK 1.3 based environment.

Any chance to get the <available> task a bit extended so
that it can also be used to check for methods, fields,
implemented interfaces etc. and specific properties, like
for example
  <available property="overrideGraphics"
      <paramtype name="int"/>
      <paramtype name="int"/>


View raw message