Created
March 27, 2015 00:13
-
-
Save ppazos/c0bcdd3ed90aafa9d489 to your computer and use it in GitHub Desktop.
Groovy get all fields and values
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object.class.declaredFields.findAll{!it.synthetic}.collectEntries{ [ (it.name):this."$it.name" ] } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment