1 16 package com.ibatis.common.beans; 17 18 21 public class ProbeFactory { 22 23 private static final Probe DOM = new DomProbe(); 24 private static final Probe BEAN = new ComplexBeanProbe(); 25 private static final Probe GENERIC = new GenericProbe(); 26 27 32 public static Probe getProbe() { 33 return GENERIC; 34 } 35 36 44 public static Probe getProbe(Object object) { 45 if (object instanceof org.w3c.dom.Document ) { 46 return DOM; 47 } else { 48 return BEAN; 49 } 50 } 51 52 } 53 | Popular Tags |