Do you use Java annotations?

annotations, java, java-5

Solution

Perhaps the most useful and used case of Java Annotations is to use POJO + Annotation instead of xml configuration files

I use it a lot since (as you already stated) if you use a web framework (like spring or seam) they usually have plenty of annotations to help you.

I have recently wrote some annotations to build a custom statemachine, validations purpose and annotations of annotations (using the metadata aspect of it). And IMO they help a lot making the code cleaner, easier to understand and manage.

Problem

Possible Duplicates: How and where are Annotations used in Java? Java beans, annotations: What do they do? How do they help me? Over and over, I read about Java 5's annotations being an 'advanced feature' of the language. Until recently, I haven't much used annotations (other than the usual @Override, &c), but work on a number of webservice-related projects has forced my hand. Since I learned Java pre-5, I never really took the time to sit down and grok the annotation system. My question- do you guys actually use annotations? How helpful are they to you, day-to-day? How many StackOverflow-ers have had to write a custom annotation?

Original source

Related problems