Created
November 2, 2015 21:21
-
-
Save lordcodes/0bc0a939cdbb9b738af5 to your computer and use it in GitHub Desktop.
Gradle function to print out the contents of an object
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
def void explainMe(it) { | |
println "Examining $it.name:" | |
println "Meta:" | |
println it.metaClass.metaMethods*.name.sort().unique() | |
println "Methods:" | |
println it.metaClass.methods*.name.sort().unique() | |
println "Properties:" | |
println it.properties.entrySet()*.toString() | |
.sort().toString().replaceAll(", ","\n") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment