ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "J.Pietschmann" <j3322...@yahoo.de>
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"
     class="java.awt.GraphicsConfiguration">
    <method="createCompatibleVolatileImage"
      abstract="yes">
      <paramtype name="int"/>
      <paramtype name="int"/>
    </method>
  </available>

J.Pietschmann


Mime
View raw message