public String getDescriptorLocation() { if (descriptorLocation == null) { URL[] urls = new URL[1]; try { urls[0] = new File(Config.getConfigPath(), fileName).toURI().toURL(); ClassLoader classLoader = Common.createExtensionsClassLoader(urls); Class deviceClass = Class.forName(className, true, classLoader); Device device = (Device) deviceClass.newInstance(); com.barteo.emulator.EmulatorContext oldContext = new com.barteo.emulator.EmulatorContext(emulatorContext); device.init(oldContext); descriptorLocation = device.getDescriptorLocation(); } catch (MalformedURLException ex) { Logger.error(ex); } catch (ClassNotFoundException ex) { Logger.error(ex); } catch (InstantiationException ex) { Logger.error(ex); } catch (IllegalAccessException ex) { Logger.error(ex); } } return descriptorLocation; }
ClassLoader classLoader = Common.createExtensionsClassLoader(urls); HashMap devices = new HashMap(); for (Iterator it = descriptorEntries.iterator(); it.hasNext();) {
URL[] urls = new URL[1]; urls[0] = new File(Config.getConfigPath(), entry.getFileName()).toURI().toURL(); classLoader = Common.createExtensionsClassLoader(urls);
ClassLoader classLoader = Common.createExtensionsClassLoader(urls); HashMap devices = new HashMap(); for (Iterator it = descriptorEntries.iterator(); it.hasNext();) {
URL[] urls = new URL[1]; urls[0] = new File(Config.getConfigPath(), defaultDevice.getFileName()).toURI().toURL(); classLoader = createExtensionsClassLoader(urls);
URL[] urls = new URL[1]; urls[0] = new File(Config.getConfigPath(), entry.getFileName()).toURI().toURL(); classLoader = Common.createExtensionsClassLoader(urls);