type==null||type.length() <=0){ type=defaultType; } if(table.containsKey(type)){ return ((XMLTool)Class.forName(table.get(type). toString()).newInstance()); } if(classname!=null&&classname.length() >0){ try{ XMLTool temp=((XMLTool)Class.forName(classname). newInstance()); if(type!=null&&type.length() >0){ table.put(type,classname); } return temp; }catch(Exception ee){ System.out.println(ee.getMessage() ); System.out.println(\"指定的XMLTool不存在\"); return null; } } return null; }catch(Exception e){ System.out.println(e.getMessage() ); System.out.println(\"指定的XMLTool不存在\"); return null; } } public static String getDefaultType(){ return defaultType; }
static { table=new Hashtable(); table.put(\"test\",\"com.ceic.workflow.xml.Tool. XMLToolTest\"); table.put(\"show\",\"com.ceic.workflow.xml.Tool. XMLToolShow\"); defaultType=\"test\"; ower=\"show\"; } }
上一页 [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] |