1 29 30 package com.caucho.config.core; 31 32 import com.caucho.config.BuilderProgram; 33 import com.caucho.config.BuilderProgramContainer; 34 import com.caucho.util.L10N; 35 36 import javax.annotation.PostConstruct; 37 38 41 public class ResinIf extends ResinControl { 42 private static final L10N L = new L10N(ResinIf.class); 43 44 private BuilderProgramContainer _init = new BuilderProgramContainer(); 45 46 private boolean _test = false; 47 48 51 public void setTest(boolean value) 52 { 53 _test = value; 54 } 55 56 59 public void addBuilderProgram(BuilderProgram program) 60 { 61 _init.addProgram(program); 62 } 63 64 @PostConstruct 65 public void init() 66 throws Throwable 67 { 68 Object object = getObject(); 69 70 if (_test && object != null) 71 _init.configure(object); 72 } 73 } 74 75 | Popular Tags |