1 7 package jfox.test; 8 9 import org.jfox.framework.annotation.Constant; 10 import org.jfox.framework.annotation.Service; 11 import org.jfox.framework.annotation.Inject; 12 import org.jfox.framework.component.ComponentContext; 13 import org.jfox.framework.component.ComponentInitialization; 14 15 18 @Service( 19 id = "User1") 20 public class User1 implements IUser, ComponentInitialization { 21 22 @Inject(id = "UserManager") 23 IUserManager userMgr; 24 25 @Constant("World") 26 private String name = "User1"; 27 28 public User1() { 29 } 30 31 32 38 public void postContruct(ComponentContext componentContext) { 39 } 40 41 45 public void postInject() { 46 userMgr.addUser(this); 47 } 48 49 public String getName() { 50 return name; 51 } 52 53 public static void main(String [] args) { 54 55 } 56 } 57 | Popular Tags |