On 25 October 2016 at 16:02, VG <[email protected]> wrote:
> Hi there,
>
> why this does not work?
>
> class Example {
> @Delegate Date when
> }
>
> def x = new Example(when: new Date())
> x.next() // fails
>
> I checked
> http://docs.groovy-lang.org/latest/html/groovy-jdk/java/util/Date.html and
> the next method is available there? Should not the method next be available
> through @delegate?
`next()` is not really a method on `java.util.Date`, but a Groovy's extension.
`Date`'s methods are all there. E.g.
x.time // works
Cheers,
Dinko
>
> Thanks, Vitor
>
>
>
>
>
> --
> View this message in context:
> http://groovy.329449.n5.nabble.com/Delegate-and-Date-tp5736295.html
> Sent from the Groovy Users mailing list archive at Nabble.com.