Tommaso Taruffi
Tommaso Taruffi

Reputation: 9252

Java annotation force write the javadoc

It's possible to create a custom annotation to force that a method have a javadoc?

I would like to create an annotation that check if method follow specific rules. And I cannot understand how to check the javadoc.

Can anyone help me?

Upvotes: 1

Views: 172

Answers (2)

Adam Siemion
Adam Siemion

Reputation: 16039

You can use checkstyle to check the methods contain the javadoc.

Upvotes: 3

If you are using Eclipse as IDE then you can set a compiler-flag that is showing errors if no javadoc is detected (use that carefully since that is quite verbose!)..

enter image description here

Upvotes: 1

Related Questions