Non-PMC +1 on using getAs, because I feel the semantics are sufficiently different, and trying to retrofit this might lead to unexpected edge cases now and/or headaches in the future. What do others think ? -------- Ursprüngliche Nachricht --------Von: adithyank <[email protected]> Datum: 16.05.18 16:00 (GMT+01:00) An: [email protected] Betreff: Re: Java object conversion using ConfigSlurper Yes Jesper,
It works. But, If that `MyConfig` class has fields of `List` or `Map` types, then it does not work. I am looking this feature as a way of converting `ConfigObject` (inturn Map<String, Map<Stirng, Map<String, Map<String>>>>....) of any levels to its respective java object with nested `List<anyclass>`, `Map<anyclass>`, `Other classes`. Now, what decision can we take? Below are the options 1. I will look on the existing coercion codes to some how fit this use case of creating nested objects recursively or 2. `T ConfigObject.getAs(Class<T>)` can be implemented without affecting the existing semantics of `Map as SomeClass` Pls advice -- Sent from: http://groovy.329449.n5.nabble.com/Groovy-Dev-f372993.html
