Closed pauxus closed 5 years ago
For the situation:
@DSL class Server { @Key name } @DSL class Cluster { @Field(fixedKey = "main") Server main Map<String, Server> servers }
should create the main methods as for a non keyed Object:
Server main(Closure body) // instead of Server main(String key, Closure body)
an alternative might even be @Field(keyFromField = true)
@Field(keyFromField = true)
or
@Field(key = { value })
In that case, keyFromField could be implemented as empty interface.
For the situation:
should create the main methods as for a non keyed Object:
an alternative might even be
@Field(keyFromField = true)