Skip to content

Instantly share code, notes, and snippets.

@momolinus
Created July 18, 2013 12:40
Show Gist options
  • Save momolinus/6028993 to your computer and use it in GitHub Desktop.
Save momolinus/6028993 to your computer and use it in GitHub Desktop.
Sample with CommentTemplate
import de.devboost.commenttemplate.CommentTemplate;
import de.devboost.commenttemplate.VariableAntiQuotation;
public class EventGeneratorSource {
public EventGeneratorSource() {
System.out.println("constructed: " + this.getClass().getSimpleName());
}
@CommentTemplate
@VariableAntiQuotation("@%s")
public String generate(String alarm) {
/*
* <event signal="@alarm" />
*/
return "";
}
public static void main(String[] args) {
new EventGeneratorSource().generate("red");
// class don't exist
// new EventGenerator().generate("red");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment