LoginSignup
18
13

More than 5 years have passed since last update.

@Documented アノテーションの意味

Posted at

@Documented がないとき

実装

Hoge.java
@MyAnnotation
public class Hoge {}
MyAnnotation.java
public @interface MyAnnotation {}

Javadoc 生成

> javadoc -d doc -encoding UTF-8 -charset UTF-8 Hoge.java MyAnnotation.java

出力結果

documented.JPG

@Documented があるとき

実装

Hoge.java
@MyAnnotation
public class Hoge {}
MyAnnotation.java
import java.lang.annotation.Documented;

@Documented
public @interface MyAnnotation {}

Javadoc 生成

省略

出力結果

documented.JPG

アノテーションのリンクが出力されるようになってる。

参考

18
13
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
18
13