1 4 package org.enhydra.snapper.spec; 5 6 7 public class IndexFactory { 8 9 12 private IndexFactory() { 13 } 14 15 18 public static Index getIndex(String fullClassName)throws Exception { 19 20 Index result = null; 21 22 Class objectClass = null; 23 24 try { 25 27 28 objectClass = Class.forName(fullClassName); 29 30 result = (Index)objectClass.newInstance(); 31 32 33 34 } catch (Exception ex) { 35 System.out.println("Error on creating the object" + ex); 36 } 37 38 return result; 39 } 40 41 42 43 44 45 46 47 48 } | Popular Tags |