I have a param Map which can contain strings as well as custom object types as value. How can I get the class name of the Maps value entry.
Right now if I do
paramMap.each {
println(it.value.class.name)
}
It gives me all entries as java.util.LinkedHashMap$Entry
How can I get the actual type of the value stored in the map
like String, Configuration, SecurityConfig... etc.
Thanks in advance
This should work:
paramMap.each { key, value ->
println( value.getClass().name )
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With