Created
March 30, 2011 15:41
-
-
Save anonymous/894632 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class GeneratedClass { | |
private String accessModifier; | |
private String name; | |
private String superClass; | |
private List<Method> methods; | |
} | |
public class Method { | |
private String comments; | |
private String name; | |
private String accessModifier; | |
private Type returnType; | |
private List<Argument> arguments; | |
private String body; | |
} | |
public class Argument { | |
private Type type; | |
private String name; | |
} | |
public class Type { | |
private String name; | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
group Java; | |
class(accessModifier, name, superclass, methods)::=<< | |
$accessModifier$ class $name$ extends $superclass$ { | |
$methods:method(); separator="\n"$ | |
} | |
>> | |
method(method)::=<< | |
/** | |
$method.comments$ | |
*/ | |
$method.accessModifier$ $method.returnType.name$ $name$ ($method.arguments:argument(); separator=","$) { | |
$method.body$ | |
} | |
>> | |
argument(argument)::=<< | |
$argument.type.name$ $argument.name$ | |
>> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment