How to create and use a self-defined annotaion in Seam?
1. create annotation intercepter class, following annotations can set some properties for this annotation.
2. define marker annotation.
Note:
在使用Retention型態時,需要提供java.lang.annotation.RetentionPolicy的枚舉型態
package java.lang.annotation;
public enum RetentionPolicy
{
SOURCE, //編譯程序處理完Annotation信息後就完成任務
CLASS, //編譯程序將Annotation儲存於class檔中,缺省
RUNTIME //編譯程序將Annotation儲存於class檔中,可由VM讀入
}
3. imply the self-define annotation in the needed programm.Note: so when call some method of LoadPageInfor, it will call the TimeInterceptor.timeCall();