private static StartOptions[] getStartOptions(int options) { if (options == 0) { return new StartOptions[0]; } Collection<StartOptions> result = new ArrayList<Module.StartOptions>(2); if ((options & Bundle.START_TRANSIENT) != 0) { result.add(StartOptions.TRANSIENT); } if ((options & Bundle.START_ACTIVATION_POLICY) != 0) { result.add(StartOptions.USE_ACTIVATION_POLICY); } return result.toArray(new StartOptions[result.size()]); }
String findLibrary(String libname) { String path = findLibrary0(libname); if (path != null) { synchronized (loadedNativeCode) { if (loadedNativeCode.contains(path) || generation.getBundleInfo().getStorage().getConfiguration().COPY_NATIVES) { // we must copy the library to a temp space to allow another class loader to load the // library String temp = generation.getBundleInfo().getStorage().copyToTempLibrary(generation, path); if (temp != null) path = temp; } else { loadedNativeCode.add(path); } } } return path; }