1 7 package simpleapp.spec; 8 9 public class SimpleListOfDiscsFactory { 10 11 private SimpleListOfDiscsFactory() { 12 } 13 14 public static SimpleListOfDiscs createSimpleListOfDiscs(String fullClassName) { 15 SimpleListOfDiscs result = null; 16 Class objectClass = null; 17 18 try { 19 objectClass = Class.forName(fullClassName); 21 result = (SimpleListOfDiscs) objectClass.newInstance(); 22 } catch (Exception ex) { 23 System.out.println("Error on creating the object" + ex); 24 } 25 26 return result; 27 } 28 } 29 | Popular Tags |