From 16a5982451ba51d6e009994f3465c377f2821dd6 Mon Sep 17 00:00:00 2001 From: Morgan Date: Tue, 13 Mar 2018 19:17:13 +0100 Subject: [PATCH] cheat sheet groovy --- cheat/groovy.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 cheat/groovy.md diff --git a/cheat/groovy.md b/cheat/groovy.md new file mode 100644 index 0000000..c9c9d5a --- /dev/null +++ b/cheat/groovy.md @@ -0,0 +1,7 @@ +# List class methods +`.metaClass.methods*.name.sort().unique()` + +## Example +`println new Person().metaClass.methods*.name.sort().unique()` + +Source http://groovy-almanac.org/list-the-methods-of-a-groovy-class/