Method Body

When you need to extract a specific method body use the include-groovy plugin.Consider the following file:Specify a method name to extract it from the file. :include-groovy: HelloWorldTest.groovy {entry: "should calculate risk based on epsilon", bodyOnly: true} If bodyOnly is specified, signature will be omitted.

Overloads

Specify types inside brackets to select an overloaded versions of your methods.Types should appear as they do in the file, i.e., if you use the short version of a type, you need to use the short version inside the plugin. :include-groovy: HelloWorld.groovy {entry: "methodName(List, Map)"} :include-groovy: HelloWorld.groovy {entry: "methodName(def,def)"} Note: Generic types are erased and spaces after commas are optionalNote: def type remains def and not Object

Class Body

import your.company.com.util.* /* groovy docs on top */ class HelloWorld { void methodName(List<String> a, Map<String, Integer> b) { actionA() } void methodName(List<String> a, Boolean b) { actionB() } void methodName(def a, def b) { actionC() } } To extract class body use: :include-groovy: HelloWorld.groovy {entry: "HelloWorld"} Use bodyOnly to only display only the body of your class. :include-groovy: HelloWorld.groovy {entry: "HelloWorld", bodyOnly: true}