본문 바로가기

Java

[박혜웅] JAVA Custom Annotations

annotation에 대한 기본 강좌
http://www.ibm.com/developerworks/library/j-annotate1/

위 강좌를 읽어보니, custom anotation을 정의하는 것은 이해했는데,
제대로 사용하려면 JAVA reflection 도 이해해야 한다.
아래 소스를 직접 실행해 보고, 이해해 보자.

AnnotationClass.java
AnnotationTest.java

실행결과
field1 has 'value of field1.'.
method1 returns 'return of method1(param1)'.