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();