开发者

How to create a custom Annotation and processing it using APT?

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 Anno开发者_开发百科tations?

Thanks


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜