Skip to content

Instantly share code, notes, and snippets.

@batmat
Created April 16, 2014 13:58
Show Gist options
  • Save batmat/10879843 to your computer and use it in GitHub Desktop.
Save batmat/10879843 to your computer and use it in GitHub Desktop.
JSR 308 Illustration : Multiple same annotations on the same elements don't require wrapping it from Java 8
// Legacy style
@SomeAnnotations({
@SomeAnnotation(..a..),
@SomeAnnotation(..b..),
@SomeAnnotation(..c..),
})
public class SomeClass {
...
}
// Java 8 style, thanks to JSR 308
// Legacy style
@SomeAnnotation(..a..)
@SomeAnnotation(..b..)
@SomeAnnotation(..c..)
public class SomeClass {
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment