List/Grid Tag Archives: Annotations

Java Annotations Tutorial with Custom Annotation
Java Annotations provide information about the code and they have no direct effect on the code they annotate. In this tutorial, we will learn about Java annotations, how to write custom ...

Java Annotations – Retention
Consider a Java annotation: public @interface AnAnnotaton {} A class with this annotation applied on it: @AnAnnotaton class AnAnnotatedClass{ } And a test which checks if ...

Java Annotations: Explored & Explained
One of the many wonderful features of Java 5 SE is the introduction of the Annotations construct. Annotations are tags that we can insert into our program source code for some tool ...

Make your Spring Security @Secured annotations more DRY
Recently a user on the Grails User mailing list wanted to know how to reduce repetition when defining @Secured annotations. The rules for specifying attributes in Java annotations are ...

DBUnit, Spring and Annotations for Database testing
If you have ever tried writing database tests in Java you might have come across DBUnit. DBUnit allows you to setup and teardown your database so that it contains consistent rows that ...

Java Annotations & A Real World Spring Example
An “annotation” is a type of programming language definition and used as a “marker”. They can be thought as comment lines which programming language engine can understand. ...

