6 ms·
Google Java Annotations Gallery
- galaktor 13y agoLooks fun. I assume it's still up to the application devs as to how they handle those annotations then (say on a build server or when the docs are generated)? Unless I'm missing something, there doesn't appear to be any direct effect of using them other than the meta-data that they add. Edit: looks like "gag-agent" is there to react to the annotations, but it's not clear to me where/how that would work
- RyanZAG 13y agoThey have a couple examples down the page on it - a few of the annotations have runtime effects. eg: @Roulette( probability = 0.005, exception = PayYourContractorException, message = "Courtesy reminder") public Service getRockSolidService() {
- tokenizerrr 13y agoIt's mostly there to send messages to your fellow programmers, it seems. The instrumentation jar will enforce the behaviors of the annotations under the Enforceable category.
- deleted 13y ago[deleted]
- terhechte 13y ago@BossMadeMeDoIt would have been the standard annotation for 90% all of methods in a company that I know.
- _pmf_ 13y agoThat's strangely intriguing.
- tekacs 13y agoStrangely compelling, even. Something that almost seems as though it wouldn't be completely out of place in a production codebase (though you'd probably want to ensure that they were elided or at least renamed before shipping :P).
- sgt 13y agoI'm just waiting for the Ruby guys to contribute with their generally sarcastic comments against Java. :-)
- garysweaver 13y agoThey are just being polite, waiting for the Java developers to finish trying get Eclipse or IDea to autocomplete their new annotations.
- dunham 13y agoThe most annoying is: "I'm gonna save your changes, but let me recompile the entire project first."
- dunham 13y agoThe most annoying is: "I'm gonna save your changes, but let me recompile the entire project first."
- penland 13y agoWell done, very well done indeed.
- eip 13y agoThey probably have lots of testing to do while they wait. So no hurry.
- moondowner 13y agoThis was an April Fools from 2010.
- jdkanani 13y agoThat's fun. Here is another awesome one: 7xx-RFC codes https://github.com/joho/7XX-rfc https://github.com/joho/7XX-rfc
- nkchandra 13y agoThat's really funny .. good work
- ww520 13y agoGood fun. I'm waiting for someone to put in the LOLCODE.
- peterkelly 13y agoHow about @CopiedThisFromStackOverflowButStillNotEntirelySureHowItWorks
- skyebook 13y agoUnfortunately, this seems to hold for any number of languages. To make matters worse, the code is rarely documented as a grab from SO
- fmrzt 13y agole brogrammer memes XDD #yolo
- andrewaylett 13y agoIs it wrong that I really want to use some of these in my current project?
- smrtinsert 13y agoThe best part is that you could actually do stuff using these annotations. The joke is functional.
- alsocasey 13y ago@Metaphor public interface Life extends Box<Chocolate> { } Shouldn't this be @simile?
- sah2ed 13y agoThe use of metaphor here is correct. "SIMILE: a figure of speech comparing two unlike things that is often introduced by like or as (as in cheeks like roses). “She's as fierce as a tiger” is a simile, but “She's a tiger when she's angry” is a metaphor."
- eip 13y ago"Life is like a box of chocolates"
- kinofcain 13y agoI think it's valid since Life, in this case, extends Box of Chocolates and therefore "is a" Box of Chocolates. If Life had implemented the same interfaces or extended the same parent class as Box of Chocolates, then it would be a @simile as Life, in that case, would be "like a" Box of Chocolates.
- yohui 13y agoSimiles are a subset of metaphors, anyways.