Skip to content

Instantly share code, notes, and snippets.

@pditommaso
Forked from wololock/dgm.groovy
Created January 16, 2019 20:56
Show Gist options
  • Save pditommaso/c32c36146cc9f30f00f368e0e3fc29c4 to your computer and use it in GitHub Desktop.
Save pditommaso/c32c36146cc9f30f00f368e0e3fc29c4 to your computer and use it in GitHub Desktop.
@Grab(group = "org.reflections", module = "reflections", version = "0.9.11")
import groovy.json.JsonOutput
import org.codehaus.groovy.reflection.GeneratedMetaMethod
import org.reflections.Reflections
import org.reflections.util.ConfigurationBuilder
def reflections = new Reflections(new ConfigurationBuilder().build())
def json = reflections.getSubTypesOf(GeneratedMetaMethod).collect {
[name: it.name, allDeclaredConstructors: true, allPublicConstructors: true, allDeclaredMethods: true, allPublicMethods: true]
}
println JsonOutput.prettyPrint(JsonOutput.toJson(json))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment