Created
July 18, 2013 12:40
-
-
Save momolinus/6028993 to your computer and use it in GitHub Desktop.
Sample with CommentTemplate
This file contains 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
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