Hello XDoclet guys,
I am rather new to the tool, and my question might be obvious, but still -
your help will be highly appreciated:
Can I use XDoclet to generate new methods in classes/interfaces according
to existing, tagged, methods and with the same parameter signature?
An example:
I have a class
class Worker implements IWork {
/**
* @mynamespace.mytag addmock="true"
*/
public void doWork(A a, B b, C c)
{
do something ....
}
}
which implements an interface:
interface IWork {
/**
* @mynamespace.mytag addmock="true"
*/
void doWork(A a, B b, C c);
}
Can XDoclet add, for both interface and class, and for all methods marked
with
@mynamespace.mytag addmock="true"
a 'mirror' method 'mock' (e.g. mock_doWork) that will receives the same
parameters:
class Worker implements IWork {
public void doWork(A a, B b, C c)
{ ....
}
public void mock_doWork(A a, B b, C c)
{ ....
}
}
and:
interface IWork {
void doWork(A a, B b, C c);
void mock_doWork(A a, B b, C c);
}
Please notice that:
a) I want the mock methods to be added to the _original_ classes/files
b) If possible, I'd much prefer a solution that requires tagging of
interface methods _only_ and upon detection of such a tag, will add both
interface methods and
class methods (for all concrete classes implementing the interface)
Thanks for your assistance,
Gilad Haimov
R&D, Application Servers, Gateways and Infrastructure
[EMAIL PROTECTED]
voice: 972-3-7664678
bmcsoftware Visit: www.bmc.com
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
xdoclet-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user