processing meta annotations with Java
Everybody who is using Spring these days knows that Spring has many annotations that are just used to group together a couple of other annotations and so to keep the number of annotations small. For example the @RestController annotation combines basically the @Controller and the @ResponseBody annotation so that the user only needs to annotate his class with one annotation instead of two annotations.
@Target({ElementType.TYPE}) @Retention(RetentionPolicy.RUNTIME) @Documented @Controller @ResponseBody public @interface RestController { String value() default ""; } The JEE @Stereotype annotation works basically the same way.