public String findLibrary(String libname) { NativeCodeFinder currentFinder; synchronized (this.genMonitor) { if (nativeCodeFinder == null) { nativeCodeFinder = new NativeCodeFinder(this); } currentFinder = nativeCodeFinder; } return currentFinder.findLibrary(libname); }
private String findEclipseNativeCode(String libname, String mappedName, String[] altMappedNames) { if (libname.length() == 0) return null; if (libname.charAt(0) == '/' || libname.charAt(0) == '\\') libname = libname.substring(1); String result = searchEclipseVariants(mappedName); if (result != null) return result; for (int i = 0; i < altMappedNames.length && result == null; i++) result = searchEclipseVariants(altMappedNames[i]); return result; }
private String findLibrary0(String libname) { String path = null; List<ClassLoaderHook> hooks = generation.getBundleInfo().getStorage().getConfiguration().getHookRegistry().getClassLoaderHooks(); for (ClassLoaderHook hook : hooks) { path = hook.findLocalLibrary(generation, libname); if (path != null) { return path; } } String mappedName = System.mapLibraryName(libname); String[] altMappedNames = mapLibraryNames(mappedName); // first check Bundle-NativeCode header path = findBundleNativeCode(libname, mappedName, altMappedNames); // next check eclipse specific support return path != null ? path : findEclipseNativeCode(libname, mappedName, altMappedNames); }
private String findBundleNativeCode(String libname, String mappedName, String[] altMappedNames) { String path = null; if (debug.DEBUG_LOADER) Debug.println(" mapped library name: " + mappedName); //$NON-NLS-1$ List<String> nativePaths = getNativePaths(); if (nativePaths.isEmpty()) { return null; } path = findNativePath(nativePaths, mappedName); if (path == null) { for (int i = 0; i < altMappedNames.length && path == null; i++) path = findNativePath(nativePaths, altMappedNames[i]); } if (path == null) { if (debug.DEBUG_LOADER) Debug.println(" library does not exist: " + mappedName); //$NON-NLS-1$ path = findNativePath(nativePaths, libname); } if (debug.DEBUG_LOADER) Debug.println(" returning library: " + path); //$NON-NLS-1$ return path; }
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; }
private String findLibrary0(String libname) { String path = null; List<ClassLoaderHook> hooks = generation.getBundleInfo().getStorage().getConfiguration().getHookRegistry().getClassLoaderHooks(); for (ClassLoaderHook hook : hooks) { path = hook.findLocalLibrary(generation, libname); if (path != null) { return path; } } String mappedName = System.mapLibraryName(libname); String[] altMappedNames = mapLibraryNames(mappedName); // first check Bundle-NativeCode header path = findBundleNativeCode(libname, mappedName, altMappedNames); // next check eclipse specific support return path != null ? path : findEclipseNativeCode(libname, mappedName, altMappedNames); }
private String findBundleNativeCode(String libname, String mappedName, String[] altMappedNames) { String path = null; if (debug.DEBUG_LOADER) Debug.println(" mapped library name: " + mappedName); //$NON-NLS-1$ List<String> nativePaths = getNativePaths(); if (nativePaths.isEmpty()) { return null; } path = findNativePath(nativePaths, mappedName); if (path == null) { for (int i = 0; i < altMappedNames.length && path == null; i++) path = findNativePath(nativePaths, altMappedNames[i]); } if (path == null) { if (debug.DEBUG_LOADER) Debug.println(" library does not exist: " + mappedName); //$NON-NLS-1$ path = findNativePath(nativePaths, libname); } if (debug.DEBUG_LOADER) Debug.println(" returning library: " + path); //$NON-NLS-1$ return path; }
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; }
private String findLibrary0(String libname) { String path = null; List<ClassLoaderHook> hooks = generation.getBundleInfo().getStorage().getConfiguration().getHookRegistry().getClassLoaderHooks(); for (ClassLoaderHook hook : hooks) { path = hook.findLocalLibrary(generation, libname); if (path != null) { return path; } } String mappedName = System.mapLibraryName(libname); String[] altMappedNames = mapLibraryNames(mappedName); // first check Bundle-NativeCode header path = findBundleNativeCode(libname, mappedName, altMappedNames); // next check eclipse specific support return path != null ? path : findEclipseNativeCode(libname, mappedName, altMappedNames); }
public String findLibrary(String libname) { NativeCodeFinder currentFinder; synchronized (this.genMonitor) { if (nativeCodeFinder == null) { nativeCodeFinder = new NativeCodeFinder(this); } currentFinder = nativeCodeFinder; } return currentFinder.findLibrary(libname); }
private String findBundleNativeCode(String libname, String mappedName, String[] altMappedNames) { String path = null; if (debug.DEBUG_LOADER) Debug.println(" mapped library name: " + mappedName); //$NON-NLS-1$ List<String> nativePaths = getNativePaths(); if (nativePaths.isEmpty()) { return null; } path = findNativePath(nativePaths, mappedName); if (path == null) { for (int i = 0; i < altMappedNames.length && path == null; i++) path = findNativePath(nativePaths, altMappedNames[i]); } if (path == null) { if (debug.DEBUG_LOADER) Debug.println(" library does not exist: " + mappedName); //$NON-NLS-1$ path = findNativePath(nativePaths, libname); } if (debug.DEBUG_LOADER) Debug.println(" returning library: " + path); //$NON-NLS-1$ return path; }
private String findEclipseNativeCode(String libname, String mappedName, String[] altMappedNames) { if (libname.length() == 0) return null; if (libname.charAt(0) == '/' || libname.charAt(0) == '\\') libname = libname.substring(1); String result = searchEclipseVariants(mappedName); if (result != null) return result; for (int i = 0; i < altMappedNames.length && result == null; i++) result = searchEclipseVariants(altMappedNames[i]); return result; }
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; }
private String findLibrary0(String libname) { String path = null; List<ClassLoaderHook> hooks = generation.getBundleInfo().getStorage().getConfiguration().getHookRegistry().getClassLoaderHooks(); for (ClassLoaderHook hook : hooks) { path = hook.findLocalLibrary(generation, libname); if (path != null) { return path; } } String mappedName = System.mapLibraryName(libname); String[] altMappedNames = mapLibraryNames(mappedName); // first check Bundle-NativeCode header path = findBundleNativeCode(libname, mappedName, altMappedNames); // next check eclipse specific support return path != null ? path : findEclipseNativeCode(libname, mappedName, altMappedNames); }
public String findLibrary(String libname) { NativeCodeFinder currentFinder; synchronized (this.genMonitor) { if (nativeCodeFinder == null) { nativeCodeFinder = new NativeCodeFinder(this); } currentFinder = nativeCodeFinder; } return currentFinder.findLibrary(libname); }
private String findBundleNativeCode(String libname, String mappedName, String[] altMappedNames) { String path = null; if (debug.DEBUG_LOADER) Debug.println(" mapped library name: " + mappedName); //$NON-NLS-1$ List<String> nativePaths = getNativePaths(); if (nativePaths.isEmpty()) { return null; } path = findNativePath(nativePaths, mappedName); if (path == null) { for (int i = 0; i < altMappedNames.length && path == null; i++) path = findNativePath(nativePaths, altMappedNames[i]); } if (path == null) { if (debug.DEBUG_LOADER) Debug.println(" library does not exist: " + mappedName); //$NON-NLS-1$ path = findNativePath(nativePaths, libname); } if (debug.DEBUG_LOADER) Debug.println(" returning library: " + path); //$NON-NLS-1$ return path; }
private String findEclipseNativeCode(String libname, String mappedName, String[] altMappedNames) { if (libname.length() == 0) return null; if (libname.charAt(0) == '/' || libname.charAt(0) == '\\') libname = libname.substring(1); String result = searchEclipseVariants(mappedName); if (result != null) return result; for (int i = 0; i < altMappedNames.length && result == null; i++) result = searchEclipseVariants(altMappedNames[i]); return result; }
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; }
private String findLibrary0(String libname) { String path = null; List<ClassLoaderHook> hooks = generation.getBundleInfo().getStorage().getConfiguration().getHookRegistry().getClassLoaderHooks(); for (ClassLoaderHook hook : hooks) { path = hook.findLocalLibrary(generation, libname); if (path != null) { return path; } } String mappedName = System.mapLibraryName(libname); String[] altMappedNames = mapLibraryNames(mappedName); // first check Bundle-NativeCode header path = findBundleNativeCode(libname, mappedName, altMappedNames); // next check eclipse specific support return path != null ? path : findEclipseNativeCode(libname, mappedName, altMappedNames); }
public String findLibrary(String libname) { NativeCodeFinder currentFinder; synchronized (this.genMonitor) { if (nativeCodeFinder == null) { nativeCodeFinder = new NativeCodeFinder(this); } currentFinder = nativeCodeFinder; } return currentFinder.findLibrary(libname); }