1 6 7 package org.jfox.ioc.sample; 8 9 import org.jfox.ioc.ComponentContext; 10 import org.jfox.ioc.annotation.Managable; 11 import org.jfox.ioc.ext.ActiveComponent; 12 import org.jfox.ioc.ext.ManagableComponent; 13 14 17 18 public class SampleComponentC implements ManagableComponent, ActiveComponent { 19 20 private int id = 0; 21 private String name = "Hello,World from SampleComponentC"; 22 private Long time = new Long (System.currentTimeMillis()); 23 24 private ComponentContext ctx; 25 26 @Managable 27 public void setName(String name) { 28 this.name = name; 29 } 30 31 @Managable 32 public String getName() { 33 return name; 34 } 35 36 @Managable 37 public int getId() { 38 return id; 39 } 40 41 @Managable 42 public void setId(int id) { 43 this.id = id; 44 } 45 46 @Managable 47 public void setTime(Long time) { 48 this.time = time; 49 } 50 51 @Managable 52 public Long getTime() { 53 return time; 54 } 55 56 public void setComponentContext(ComponentContext ctx) { 57 this.ctx = ctx; 58 } 59 60 @Managable 61 public String getComponentDir(){ 62 return ctx.getModuleDir(); 63 } 64 65 public static void main(String [] args) { 66 67 } 68 69 } 70 71 | Popular Tags |