Skip to content

Instantly share code, notes, and snippets.

@Joxebus
Forked from wololock/dgm.groovy
Created November 28, 2020 00:16
Show Gist options
  • Save Joxebus/24a0f7ae249ff7f3df6102590a9095f0 to your computer and use it in GitHub Desktop.
Save Joxebus/24a0f7ae249ff7f3df6102590a9095f0 to your computer and use it in GitHub Desktop.
@Grab(group = "org.reflections", module = "reflections", version = "0.9.11")
@Grab(group = "org.slf4j", module = "slf4j-simple", version = "1.7.25")
import groovy.json.JsonOutput
import org.codehaus.groovy.reflection.GeneratedMetaMethod
import org.reflections.Reflections
def reflections = new Reflections("org.codehaus.groovy.runtime")
def json = reflections.getSubTypesOf(GeneratedMetaMethod).collect {
[name: it.name, allDeclaredConstructors: true, allPublicConstructors: true, allDeclaredMethods: true, allPublicMethods: true]
}
new File('dgm.json').withWriter {
it.write(JsonOutput.prettyPrint(JsonOutput.toJson(json)))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment