Costin,
As I read the code, it looks like it will call SetProject if it exists but
not if it doesn't.
Class c = proxy.getClass();
setProjectM =
c.getMethod( "setProject", new Class[] {Project.class});
if(setProjectM != null) {
setProjectM.invoke(proxy, new Object[] {project});
}
How is this failing for you?
Conor
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Friday, 12 October 2001 9:49 AM
> To: [EMAIL PROTECTED]
> Subject: TaskAdapter broken ?
>
>
> One nice feature in ant1.3 was the ability to use tasks that do not
> 'depend' on ant - i.e. generic beans, using the ant patterns
> (execute, setters ), but completely independent of ant ( in
> import ).
>
> This worked via TaskAdapter - but recently that changed, it now
> has a setProject() - which requires the task to define that
> method.
>
> There are few possible solutions:
> - remove the setProject call.
>
> - change it to setProject(Object)
>
> - ignore the exception
>
> I could implement any of those, but I need first to understand
> why the method was added in the first place.
>
> Thanks,
> Costin
>
>