Skip to content
Skip to breadcrumbs
Skip to header menu
Skip to action menu
Skip to quick search
Quick Search
Browse
Pages
Blog
Labels
Attachments
Mail
Advanced
What’s New
Space Directory
Feed Builder
Keyboard Shortcuts
Confluence Gadgets
Log In
Sign Up
Dashboard
Groovy
Copy Page
You are not logged in. Any changes you make will be marked as
anonymous
. You may want to
Log In
if you already have an account. You can also
Sign Up
for a new account.
This page is being edited by
.
Paragraph
Paragraph
Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6
Preformatted
Quote
Bold
Italic
Underline
More colours
Strikethrough
Subscript
Superscript
Monospace
Clear Formatting
Bullet list
Numbered list
Outdent
Indent
Align left
Align center
Align right
Link
Table
Insert
Insert Content
Image
Link
Attachment
Symbol
Emoticon
Wiki Markup
Horizontal rule
tinymce.confluence.insert_menu.macro_desc
Info
JIRA Issue
Status
Gallery
Tasklist
Table of Contents
Other Macros
Page Layout
No Layout
Two column (simple)
Two column (simple, left sidebar)
Two column (simple, right sidebar)
Three column (simple)
Two column
Two column (left sidebar)
Two column (right sidebar)
Three column
Three column (left and right sidebars)
Undo
Redo
Find/Replace
Keyboard Shortcuts Help
<p>The attached script can lookup both Java and Groovy's meta methods and quickly display the method signatures.</p> <h1>Usage and Examples</h1> <p>Help</p> <table class="wysiwyg-macro" data-macro-name="code" data-macro-default-parameter="none" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2NvZGU6bm9uZX0&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="PLAIN_TEXT"><tr><td class="wysiwyg-macro-body"><pre> $ groovy gdoc usage gdoc className -- display all public methods signatures. usage gdoc package.className -- same as above with full package prefix. usage gdoc className methodName -- display only methods that match this name. </pre></td></tr></table> <p>All public methods</p> <table class="wysiwyg-macro" data-macro-name="code" data-macro-default-parameter="none" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2NvZGU6bm9uZX0&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="PLAIN_TEXT"><tr><td class="wysiwyg-macro-body"><pre> groovy gdoc File equals public boolean java.lang.Object.equals(java.lang.Object) public boolean java.io.File.equals(java.lang.Object) getClass public final native java.lang.Class java.lang.Object.getClass() hashCode public native int java.lang.Object.hashCode() public int java.io.File.hashCode() notify public final native void java.lang.Object.notify() notifyAll public final native void java.lang.Object.notifyAll() toString public java.lang.String java.lang.Object.toString() public java.lang.String java.io.File.toString() wait public final void java.lang.Object.wait() throws java.lang.InterruptedException public final native void java.lang.Object.wait(long) throws java.lang.InterruptedException public final void java.lang.Object.wait(long,int) throws java.lang.InterruptedException canRead public boolean java.io.File.canRead() canWrite public boolean java.io.File.canWrite() compareTo public int java.io.File.compareTo(java.io.File) public volatile int java.io.File.compareTo(java.lang.Object) createNewFile public boolean java.io.File.createNewFile() throws java.io.IOException createTempFile public static java.io.File java.io.File.createTempFile(java.lang.String,java.lang.String) throws java.io.IOException public static java.io.File java.io.File.createTempFile(java.lang.String,java.lang.String,java.io.File) throws java.io.IOException delete public boolean java.io.File.delete() deleteOnExit public void java.io.File.deleteOnExit() exists public boolean java.io.File.exists() getAbsoluteFile public java.io.File java.io.File.getAbsoluteFile() getAbsolutePath public java.lang.String java.io.File.getAbsolutePath() getCanonicalFile public java.io.File java.io.File.getCanonicalFile() throws java.io.IOException getCanonicalPath public java.lang.String java.io.File.getCanonicalPath() throws java.io.IOException getName public java.lang.String java.io.File.getName() getParent public java.lang.String java.io.File.getParent() getParentFile public java.io.File java.io.File.getParentFile() ... many more... </pre></td></tr></table> <p>Filter method names(ones from JDK built-in)</p> <table class="wysiwyg-macro" data-macro-name="code" data-macro-default-parameter="none" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2NvZGU6bm9uZX0&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="PLAIN_TEXT"><tr><td class="wysiwyg-macro-body"><pre> $ groovy gdoc File list list public java.lang.String[] java.io.File.list() public java.lang.String[] java.io.File.list(java.io.FilenameFilter) listFiles public java.io.File[] java.io.File.listFiles() public java.io.File[] java.io.File.listFiles(java.io.FileFilter) public java.io.File[] java.io.File.listFiles(java.io.FilenameFilter) listRoots public static java.io.File[] java.io.File.listRoots() </pre></td></tr></table> <p>Filter method names(ones from Groovy's Dynamic methods)</p> <table class="wysiwyg-macro" data-macro-name="code" data-macro-default-parameter="none" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2NvZGU6bm9uZX0&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="PLAIN_TEXT"><tr><td class="wysiwyg-macro-body"><pre> $ groovy gdoc File each eachFile public static void org.codehaus.groovy.runtime.DefaultGroovyMethods.eachFile(java.io.File,groovy.lang.Closure) throws java.io.FileNotFoundException,java.lang.IllegalArgumentException each public static java.lang.Object org.codehaus.groovy.runtime.DefaultGroovyMethods.each(java.lang.Object,groovy.lang.Closure) eachFileMatch public static void org.codehaus.groovy.runtime.DefaultGroovyMethods.eachFileMatch(java.io.File,java.lang.Object,groovy.lang.Closure) throws java.io.FileNotFoundException,java.lang.IllegalArgumentException eachLine public static void org.codehaus.groovy.runtime.DefaultGroovyMethods.eachLine(java.io.File,groovy.lang.Closure) throws java.io.IOException eachObject public static void org.codehaus.groovy.runtime.DefaultGroovyMethods.eachObject(java.io.File,groovy.lang.Closure) throws java.io.IOException,java.lang.ClassNotFoundException eachDirRecurse public static void org.codehaus.groovy.runtime.DefaultGroovyMethods.eachDirRecurse(java.io.File,groovy.lang.Closure) throws java.io.FileNotFoundException,java.lang.IllegalArgumentException eachFileRecurse public static void org.codehaus.groovy.runtime.DefaultGroovyMethods.eachFileRecurse(java.io.File,groovy.lang.Closure) throws java.io.FileNotFoundException,java.lang.IllegalArgumentException eachDir public static void org.codehaus.groovy.runtime.DefaultGroovyMethods.eachDir(java.io.File,groovy.lang.Closure) throws java.io.FileNotFoundException,java.lang.IllegalArgumentException eachByte public static void org.codehaus.groovy.runtime.DefaultGroovyMethods.eachByte(java.io.File,groovy.lang.Closure) throws java.io.IOException eachDirMatch public static void org.codehaus.groovy.runtime.DefaultGroovyMethods.eachDirMatch(java.io.File,java.lang.Object,groovy.lang.Closure) throws java.io.FileNotFoundException,java.lang.IllegalArgumentException eachWithIndex public static java.lang.Object org.codehaus.groovy.runtime.DefaultGroovyMethods.eachWithIndex(java.lang.Object,groovy.lang.Closure) </pre></td></tr></table> <p>Using package prefix(any things that's outside of Groovy's default imports.)</p> <table class="wysiwyg-macro" data-macro-name="code" data-macro-default-parameter="none" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2NvZGU6bm9uZX0&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="PLAIN_TEXT"><tr><td class="wysiwyg-macro-body"><pre> groovy gdoc groovy.sql.Sql each eachRow public void groovy.sql.Sql.eachRow(groovy.lang.GString,groovy.lang.Closure) throws java.sql.SQLException public void groovy.sql.Sql.eachRow(java.lang.String,groovy.lang.Closure) throws java.sql.SQLException public void groovy.sql.Sql.eachRow(java.lang.String,groovy.lang.Closure,groovy.lang.Closure) throws java.sql.SQLException public void groovy.sql.Sql.eachRow(java.lang.String,java.util.List,groovy.lang.Closure) throws java.sql.SQLException each public static java.lang.Object org.codehaus.groovy.runtime.DefaultGroovyMethods.each(java.lang.Object,groovy.lang.Closure) eachWithIndex public static java.lang.Object org.codehaus.groovy.runtime.DefaultGroovyMethods.eachWithIndex(java.lang.Object,groovy.lang.Closure) </pre></td></tr></table>
Please type the word appearing in the picture.
Attachments
Labels
Location
Watch this page
< Edit
Preview >
Loading…
Save
Cancel
Next hint
search
attachments
weblink
advanced