return(((Integer)getProperty("dispatching.model")).intValue());
}
private static DriverInstaller getDriverInstaller(int model) {
String name = System.getProperty("jemmy.drivers.installer");
DriverInstaller installer = null;
try {
if(name != null && !(name.length() == 0)) {
installer = (DriverInstaller)new ClassReference(name).newInstance(null, null);
}
} catch(ClassNotFoundException e) {
getCurrentOutput().printLine("Cannot init driver installer:");
getCurrentOutput().printStackTrace(e);
} catch(IllegalAccessException e) {
getCurrentOutput().printLine("Cannot init driver installer:");
getCurrentOutput().printStackTrace(e);
} catch(NoSuchMethodException e) {
getCurrentOutput().printLine("Cannot init driver installer:");
getCurrentOutput().printStackTrace(e);
} catch(InstantiationException e) {
getCurrentOutput().printLine("Cannot init driver installer:");
getCurrentOutput().printStackTrace(e);
} catch(InvocationTargetException e) {
getCurrentOutput().printLine("Cannot init driver installer:");
getCurrentOutput().printStackTrace(e);
}
if(installer == null) {
if(System.getProperty("os.name").startsWith("Mac OS X")) {
installer = new APIDriverInstaller((model & SHORTCUT_MODEL_MASK) != 0);
} else {
installer = new DefaultDriverInstaller((model & SHORTCUT_MODEL_MASK) != 0);
}
};
getCurrentOutput().printLine("Using " + installer.getClass().getName() + " driver installer");
return(installer);
}