generation of implementation using Ant
Hi all,
in most IDEs there's an option to generate an empty implementation for
a given interface, or at least to fill in the implementation with a
skeleton.
I was wondering whether there was something like that in Ant, either
by default or developed somewhere by some talented open-sourcer. :-)
The idea would be to generate an empty class with the specified full
name, keeping all annotations and stuff.
(what for? Well, to help use JAXWS from interfaces, waiting for it to
provide utilities for interfaces instead of implementation classes...
but one never knows, it may be useful elsewhere)
Something like:
------------------------
<generateImpl
fromInterface="jrobinss.IMadCoder"
toImplementation="jrobinss.JavaCoder"
keepAnnotations="true"/><!-- optional arg -->
------------------------
....where IMadCoder would look like this...
------------------------
package jrobinss;
import javax.jws.WebParam;
import javax.jws.WebService;
@WebService
public interface IMadCoder {
public void code(@WebParam(name = "problemDescr") String pd);
}
--------------------
....and would generate this...
--------------------
package jrobinss;
import javax.jws.WebParam;
import javax.jws.WebService;
@WebService
public class JavaCoder implements IMadCoder {
public void code(@WebParam(name = "problemDescr") String pd) {
throw new UnsupportedOperationException("this is an empty
implementation generated by the Ant generateImpl tool");
}
}
--------------------
So, anything, anyone?
(I realize it's probably simple to code, I haven't yet really looked
into it)
--
JRobinss