ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Jan.Mate...@rzf.fin-nrw.de>
Subject AW: Correct Task Behaviour
Date Wed, 17 Oct 2007 06:56:39 GMT
setXX() can use Strings and all Classes which have a String-Constructor.
I think you can even use more than that, but I am not sure ...


public class MyTask {
    public void setFoo(Foo foo) { ... }
}
class Foo { 
    public Foo(String s) { ... }
}


Jan


>-----Urspr√ľngliche Nachricht-----
>Von: monsieur.haynes@googlemail.com 
>[mailto:monsieur.haynes@googlemail.com] Im Auftrag von Matthew Haynes
>Gesendet: Dienstag, 16. Oktober 2007 19:24
>An: Ant Developers List
>Betreff: Re: Correct Task Behaviour
>
>That's great, I had made the mistake of assuming that the setSomething
>methods needed a String.
>
>Does resolve other common types, DateFomat, int, etc ?
>
>On 16/10/2007, Dominique Devienne <ddevienne@gmail.com> wrote:
>>
>> On 10/16/07, Matthew Haynes <matt@matthaynes.net> wrote:
>> > I think my problem came from accepting the file attribute 
>as a String
>> and
>> > then converting it to a file in my code.
>>
>> Yep. If you take a File, Ant does the resolution indeed, using it's
>> own rule, which is relative to basedir, as others have 
>indicated. When
>> you do new File(filename), then filename, if relative, will be
>> relative to the current directory, which may not be the same as
>> basedir. --DD
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
>> For additional commands, e-mail: dev-help@ant.apache.org
>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message