views:

231

answers:

1

Hi,

I'm new to Java Annotation. I know how to create custom annotation but I don't know how to process that Annotation to generate the dynamic code just like ejb 3.0 and hibernate does.
I read some articles based on APT but no one gives the details about how to process the Annotation.
Are there any tutorials with sample code for processing custom Annotations?

Thanks

A: 

Start with... the apt getting started guide. To go further, you could maybe have a look at the sources of annotation processor used by JPA 2.0 providers to generate the static meta model classes, for example Hibernate's one: o.h.j.JPAMetaModelEntityProcessor.java

Pascal Thivent