1 21 22 package com.izforge.izpack.util; 23 24 import com.izforge.izpack.installer.AutomatedInstallData; 25 26 27 33 34 public class OSClassHelper 35 { 36 37 protected AutomatedInstallData installdata; 38 39 protected Class workerClass = null; 40 41 protected Object worker = null; 42 43 46 public OSClassHelper() 47 { 48 super(); 49 } 50 51 58 public OSClassHelper(String className) 59 { 60 super(); 61 62 try 63 { 64 workerClass = Class.forName(className); 65 worker = workerClass.newInstance(); 66 } 67 catch (InstantiationException e) 68 { 69 e.printStackTrace(); 70 } 71 catch (IllegalAccessException e) 72 { 73 e.printStackTrace(); 74 } 75 catch (ClassNotFoundException e) 76 { 77 e.printStackTrace(); 78 } 80 catch (Exception e4) 81 { Debug.trace("Ctor OSClassHelper for " + className + ": worker not available (" + e4.getMessage() + ")."); 83 return; 84 } 85 Debug.trace("Ctor OSClassHelper for " + className + " is good: " + good()); 86 87 } 88 89 93 public boolean good() 94 { 95 return (worker != null); 96 } 97 98 104 public boolean verify(AutomatedInstallData idata) throws Exception 105 { 106 installdata = idata; 107 return (false); 108 } 109 110 } 111 | Popular Tags |