Last active
December 11, 2015 10:39
-
-
Save oehme/4588719 to your computer and use it in GitHub Desktop.
Active Annotations finally bring the preciseness of the specification into my code.
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
Xtend: | |
@Usually | |
def doStuff() { | |
println("This usually doesn't fail") | |
} | |
generated Java: | |
public void doStuff() { | |
if (System.currentTimeMillis() % 42 == 0) { | |
throw new IllegalStateException("Well, usually..."); | |
} | |
System.out.println("This usually doesn't fail"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment