01: /*
02: * JFox - The most lightweight Java EE Application Server!
03: * more details please visit http://www.huihoo.org/jfox or http://www.jfox.org.cn.
04: *
05: * JFox is licenced and re-distributable under GNU LGPL.
06: */
07: package org.jfox.framework.annotation;
08:
09: import java.lang.annotation.Target;
10: import java.lang.annotation.Retention;
11: import java.lang.annotation.RetentionPolicy;
12: import java.lang.annotation.ElementType;
13:
14: /**
15: * æ??述在 Component 上以便将该 Component å?‘布至IoC容器ä¸
16: *
17: * @author <a href="mailto:jfox.young@gmail.com">Young Yang</a>
18: */
19: @Retention(RetentionPolicy.RUNTIME)
20: @Target({ElementType.TYPE})
21: public @interface Service {
22: /**
23: * 该组件实现的接�,组件�能通过指定的接��访问,
24: * 如果没有指定接�呢,则为所有接�
25: */
26: Class[] interfaces() default {};
27:
28: /**
29: * 部署的 id
30: * Default 为Component实现类的类å??的简称
31: */
32: String id() default "";
33:
34: /**
35: * 是�在 getInstance 时,�实例化
36: * �则,在部署之�,立�进行实例化
37: */
38: boolean active() default false;
39:
40: /**
41: * 是��例,�例表示该组件�能部署一次
42: */
43: boolean singleton() default true;
44:
45: /**
46: * 优先级,在一个模å?—ä¸ç»„件,优先级值å°?çš„ä¼šè¢«åŠ è½½
47: */
48: int priority() default 50;
49:
50: /**
51: * æ??è¿°ä¿¡æ?¯
52: */
53: String description() default "";
54:
55: }
|