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: * 用æ?¥æ ‡æ³¨ä¸€ä¸ªç»„件的Field,以使得该组件在实例化的时候,由IoC容器进行ä¾?赖注入
16: *
17: * @author <a href="mailto:jfox.young@gmail.com">Young Yang</a>
18: */
19: @Retention(RetentionPolicy.RUNTIME)
20: @Target({ElementType.FIELD})
21: public @interface Inject {
22:
23: /**
24: * 注入的组件的类型
25: * 如果未指定,则由IoCå®¹å™¨æ ¹æ?®Filed的类型判æ–
26: */
27: Class type() default FieldType.class;
28:
29: /**
30: * 通过 component id进行注入
31: */
32: String id() default "";
33:
34: public static class FieldType {
35: }
36: }
|