I use Groovy to write business rules into big, long term Java software. Use Groovy in object way, that is not as groovy Script, but every elementary groovy source overrides some Java API class.
i.e. AtLoginScript, PreparePaport etc.
I had an idea to clone in very little scale IDE functionality: generate class from, or Override method.
My idea is much simpler: do automatically, only first-shot, write method stub where this must be done (abstract method), maybe in comment where may be done (non-abstract).
My mini project has first effects, in this sample GroovyGenerator create his-own 'child class'.
My target for next days is to:
- implement negative conditions for final or private method,
- some decisions with more deep parent class (now only one-level)
- types when applicable
- maybe implement groovy property from getter/setter pair?
- constructors
- extendfrom 0 or 1 class and- implementzero to \$n\$ interfaces (What to do with override level?)
I haven't big trouble with coding (one small problem: reflection usually doesn't give parameters name), but with idea.
This tool is made for in-place IT-man, who generate business rules in, for example, Notepad or simple editor non-capable in generation.
What can be done better in this project?
package pl.cogitat.scripting;
import java.lang.reflect.Method;
import java.lang.reflect.Parameter;
public class GroovyGenerator {  
    Class analyzedClass;
    private String packg;
    private String name;
    public GroovyGenerator(String pckg, String name, Class analyzedClass) {
        super();
        this.analyzedClass = analyzedClass;
        this.packg = pckg;
        this.name = name;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public String getPackg() {
        return packg;
    }
    public String performGeneration()
    {
        StringBuilder sb = new StringBuilder();
        sb.append("package ").append(packg).append("\n\n /* Code auto generated\n * do edit what You want \n */\n\n");
        String parentName = analyzedClass.getSimpleName();
        sb.append("class ").append(name).append(" extends ").append(parentName).append(" {\n");
        for(Method m : analyzedClass.getDeclaredMethods())
        {
            sb.append("def ").append(m.getName()).append("(");
            int pcnt = 0;
            for(Parameter p:m.getParameters())
            {
                if(pcnt>0)
                    sb.append(", ");
                sb.append(p.getType().getSimpleName()).append(" ").append(p.getName());
                pcnt++;
            }
            sb.append(")\n{\n}\n");
        }
        sb.append("\n}\n");
        return sb.toString();
    }
}
and untouched generated Groovy:
package my.script
 /* Code auto generated
 * do edit what You want 
 */
class SelfGenerator extends GroovyGenerator {
def getName()
{
}
def setName(String arg0)
{
}
def performGeneration()
{
}
def getPackg()
{
}
}


void) although in Groovy isn't required \$\endgroup\$