1 2 package SOFA.SOFAnode.Util; 3 4 11 12 public class BehaviorProtocolCheckerFactory { 13 14 23 public static BehaviorProtocolChecker getChecker(String className) { 24 if (className == null) 25 return new checker(); 26 Class cl = null; 27 try { 28 cl = BehaviorProtocolCheckerFactory.class.forName(className); 29 } catch (ClassNotFoundException e) { 30 return new checker(); 31 } 32 BehaviorProtocolChecker ret = null; 33 try { 34 ret = (BehaviorProtocolChecker) cl.newInstance(); 35 } catch (Exception e) { 36 return new checker(); 37 } 38 return ret; 39 } 40 } 41 | Popular Tags |