I am trying to convert a Map <String, String>
to an Object. Currently getting the groovy.lang.MissingMethodException. Here is the code:
mapToClass(Map map, Object input) {
map.each { key, value ->
input."set${key}" value
}
}
I need to identify the type of input."get${key}"
and cast value
to the same type before assigning it.
Any ideas?
Thanks.
Aucun commentaire:
Enregistrer un commentaire