Open pauxus opened 5 years ago
LateBinding could be a parameter to @Field (or a separate annotation)
Implementation could be done using a Map<String, Closure> in the RW class that is executed in postApply
Question: in which phase should late binding run? AutoCreate, autoLink or PostTree? Probably PostTree
LateBinding arguments make no sense on DSL fields, since they already have a Closure argument method
More in spirit with #84 : PostTree (and other lifecycle methods?) could be allowed on fields of type Closure
It might be an interesting idea to allow (either by default or via switch) Closure Parameters for methods:
which could create a method
String nickname(@DelegateTos(Foo) Closure<String> name)
which would only be executed called during PostApply phase.Of course, this example could be implemented using
@Default
This might be a direct alternative to #84