<aside>
๐ก Annotation ๋ฉํ ์ ๋ณด๊ฐ ์ธ์ ๋ฒ๋ ค์ง์ง์ ๋ํ ํ์ด๋ฐ ์ค์
๋ด๋ถ ์์ฑ์ผ๋ก RetentionPolicy: enum
๋ฅผ ๊ฐ์ง
</aside>
@Document
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.ANNOTATION_TYPE)
public @interface Retention {
RetentionPolicy value();
}
์๋ฌด ๊ด์ฌ ์๋ @Retention ์ด๋ ธํ ์ด์ ์ ๋ฆฌ(RetentionPolicy SOURCE vs CLASS vs RUNTIME)
<aside>
๐ก ์ฌ์ฉ์๊ฐ ์ ์ํ Annotaion์ด ์ฌ์ฉ ๋ ์ ์๋ Type์ ์ง์
๋ด๋ถ ์์ฑ์ผ๋ก ElementType: enum
๋ฐฐ์ด์ ๊ฐ์ง
</aside>
@Document
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.ANNOTATION_TYPE)
public @interface Target {
ElementType[] value();
}
<aside> ๐ก asd
</aside>