try { List<File> list = Arrays.asList(files); isJSF = ClasspathUtil.containsClass(list, FACES_EXCEPTION); } catch (IOException exception) { Exceptions.printStackTrace(exception); isJSF = ClasspathUtil.containsClass(Collections.singletonList(resource), FACES_EXCEPTION); } catch (IOException ex) { Exceptions.printStackTrace(ex);
/** * Gets the highest JSF version found on the classpath. This method can * be slow and sholdn't be called within AWT EDT. * * @param classpath consists of jar files and folders containing classes * @return JSF version if any found on the classpath, {@code null} otherwise * @since 1.46 */ @CheckForNull public static synchronized JSFVersion forClasspath(@NonNull Collection<File> classpath) { Parameters.notNull("classpath", classpath); //NOI18N try { return ClasspathUtil.containsClass(classpath, SPECIFIC_CLASS_NAMES); } catch (IOException ex) { LOG.log(Level.INFO, null, ex); } return null; }
/** * Gets the highest JSF version found on the classpath. This method can * be slow and sholdn't be called within AWT EDT. * * @param classpath consists of jar files and folders containing classes * @return JSF version if any found on the classpath, {@code null} otherwise * @since 1.46 */ @CheckForNull public static JSFVersion forClasspath(@NonNull List<URL> classpath) { Parameters.notNull("classpath", classpath); //NOI18N try { return ClasspathUtil.containsClass(classpath, SPECIFIC_CLASS_NAMES); } catch (IOException ex) { LOG.log(Level.INFO, null, ex); } return null; }
private static void searchJsfLibraries() { for (Library library : LibraryManager.getDefault().getLibraries()) { // non j2se libraries if (!"j2se".equals(library.getType())) { //NOI18N continue; } // statically excluded libraries if (EXCLUDE_FROM_REGISTERED_LIBS.contains(library.getName())) { continue; } List<URL> content = library.getContent("classpath"); //NOI18N try { Boolean foundJsfLibrary = ClasspathUtil.containsClass(content, JSF_SEEKING_MAP); if (foundJsfLibrary != null && foundJsfLibrary) { JSF_LIBRARIES_CACHE.add(library); } } catch (IOException exception) { LOG.log(Level.INFO, "", exception); } } }
List<URL> content = jsfLibrary.getContent("classpath"); //NOI18N try { faceletsPresent = ClasspathUtil.containsClass(content, "com.sun.facelets.Facelet") || //NOI18N ClasspathUtil.containsClass(content, "com.sun.faces.facelets.Facelet"); //NOI18N }catch(Exception e) { e.printStackTrace();
return containsClass(diskFiles, className);
return ClasspathUtil.containsClass(projectDeps, versionSpecificClass); //NOI18N } catch (IOException ex) { Exceptions.printStackTrace(ex);
return containsClass(diskFiles, classNames);
return ClasspathUtil.containsClass(projectDeps, SPECIFIC_CLASS_NAMES); } catch (IOException ex) { Exceptions.printStackTrace(ex);
boolean exists = false; try { exists = ClasspathUtil.containsClass(driverCP, className); } catch (IOException e) { LOGGER.log(Level.INFO, null, e);
boolean exists = false; try { exists = ClasspathUtil.containsClass(driverCP, className); } catch (IOException e) { LOG.log(Level.INFO, null, e);
isMyFaces = ClasspathUtil.containsClass(content, JSFUtils.MYFACES_SPECIFIC_CLASS); } else {