On 5/24/05, Mike Kienenberger <mkienen..laska.net> wrote:
> Erik Hatcher <eri..hatchersolutions.com> wrote:
> > On May 23, 2005, at 9:18 PM, Mike Kienenberger wrote:
> > > public Object createConfig() {
> > > this.vppConfig = new VPPConfig();
> > > return this.vppConfig;
> > > }
> >
> > This construct should be fine - Ant doesn't care about the return
> > type of the object in this case - it will use the same reflect magic
> > that it does on the task itself to dig into the object when needed.
>
> Right. I don't think java supports this distinction. It's why you can't
> overload the return type.
It's not really relevant to the problem at hand, but I think its
important to note that JDK5 actually does support overloading the
return type through covariant returns. It's one of the lesser
documented changes and can be a problem in unexpected ways if you're
not aware...
Cris
This archive was generated by hypermail 2.0.0 : Thu May 26 2005 - 12:18:01 EDT