List of usage examples for org.apache.wicket.util.string Strings beforeFirst
public static String beforeFirst(final String s, final char c)
From source file:com.gfactor.web.wicket.loader.OsgiClassResolver.java
License:Apache License
private List<String> getExportedPackages(Bundle bundle) { String exportedString = (String) bundle.getHeaders().get("Export-Package"); if (Strings.isEmpty(exportedString)) return Collections.emptyList(); String[] splitted = Strings.split(exportedString, ','); if (splitted == null || splitted.length == 0) return Collections.emptyList(); List<String> packages = new ArrayList<String>(); for (String s : splitted) { String pkg = null;/*w w w . j a v a 2s .co m*/ if (s.contains(";")) pkg = Strings.beforeFirst(s, ';').trim(); else pkg = s.trim(); if (pkg != null && pkg.length() > 0) packages.add(pkg); } return packages; }