Java Mailing List Archive

http://www.gg3721.com/

Home » user.groovy »

[groovy-user] constructors with mix of params and Map - look for docs

Mingfai

2008-08-01

Replies: Find Java Web Hosting

Author LoginPost Reply
hi,

I found a old thread about "mix of params and map"
http://www.nabble.com/constructors-with-mix-of-params-and-Map-to13115552.html#a13115552

how exactly is the usage? is there any doc? do we need to define a constructor with Map to use it?


I tried something like the following but no success:
class Simple {
    String name, text

    Simple(named=[:],String name) { this.name = name;  }
}

println new Simple([text:"hello world"],"John").text

regards,
mingfai
©2008 gg3721.com - Jax Systems, LLC, U.S.A.