/** * Returns the result of converting a list of comma-separated tokens into an array. * * @return the array of string tokens or <code>null</code> if there are none * @param stringList the initial comma-separated string */ public static String[] getArrayFromList(String stringList) { String[] result = getArrayFromList(stringList, ","); //$NON-NLS-1$ return result.length == 0 ? null : result; }
public FilteredSourcePackage(String name, BundleLoader supplier, String includes, String excludes) { super(name, supplier); this.includes = includes != null ? ManifestElement.getArrayFromList(includes) : null; this.excludes = excludes != null ? ManifestElement.getArrayFromList(excludes) : null; }
/** * Returns the result of converting a list of comma-separated tokens into an array * * @return the array of string tokens * @param prop the initial comma-separated string */ private static String[] getArrayFromList(String prop, String separator) { return ManifestElement.getArrayFromList(prop, separator); }
/** * Returns the result of converting a list of comma-separated tokens into an array * * @return the array of string tokens * @param prop the initial comma-separated string */ private static String[] getArrayFromList(String prop, String separator) { return ManifestElement.getArrayFromList(prop, separator); }
public CompositeServiceTracker(BundleContext sourceContext, BundleContext targetContext, String serviceFilters) { this.sourceContext = sourceContext; this.targetContext = targetContext; filters = ManifestElement.getArrayFromList(serviceFilters, ","); //$NON-NLS-1$ trackers = new ServiceTracker[filters.length]; }
/** * Returns the result of converting a list of comma-separated tokens into an array * * @return the array of string tokens * @param prop the initial comma-separated string */ private static String[] getArrayFromList(String prop, String separator) { return ManifestElement.getArrayFromList(prop, separator); }
/** * Returns the result of converting a list of comma-separated tokens into an array * * @return the array of string tokens * @param prop the initial comma-separated string */ private static String[] getArrayFromList(String prop, String separator) { return ManifestElement.getArrayFromList(prop, separator); }
/** * Returns the result of converting a list of comma-separated tokens into an array. * * @return the array of string tokens or <code>null</code> if there are none * @param stringList the initial comma-separated string */ public static String[] getArrayFromList(String stringList) { String[] result = getArrayFromList(stringList, ","); //$NON-NLS-1$ return result.length == 0 ? null : result; }
public FilteredSourcePackage(String name, BundleLoader supplier, String includes, String excludes) { super(name, supplier); this.includes = includes != null ? ManifestElement.getArrayFromList(includes) : null; this.excludes = excludes != null ? ManifestElement.getArrayFromList(excludes) : null; }
/** * Returns the result of converting a list of comma-separated tokens into an array * * @return the array of string tokens * @param prop the initial comma-separated string */ private static String[] getArrayFromList(String prop, String separator) { return ManifestElement.getArrayFromList(prop, separator); }
/** * Returns the result of converting a list of comma-separated tokens into an array. * * @return the array of string tokens or <code>null</code> if there are none * @param stringList the initial comma-separated string */ public static String[] getArrayFromList(String stringList) { String[] result = getArrayFromList(stringList, ","); //$NON-NLS-1$ return result.length == 0 ? null : result; }
public CompositeServiceTracker(BundleContext sourceContext, BundleContext targetContext, String serviceFilters) { this.sourceContext = sourceContext; this.targetContext = targetContext; filters = ManifestElement.getArrayFromList(serviceFilters, ","); //$NON-NLS-1$ trackers = new ServiceTracker[filters.length]; }
private void getCurrentEEs(Dictionary<Object, Object>[] platformProperties) { CURRENT_EES = new String[platformProperties.length][]; for (int i = 0; i < platformProperties.length; i++) { String eeSpecs = (String) platformProperties[i].get(Constants.FRAMEWORK_EXECUTIONENVIRONMENT); CURRENT_EES[i] = ManifestElement.getArrayFromList(eeSpecs, ","); //$NON-NLS-1$ } }
private void getCurrentEEs(Dictionary<Object, Object>[] platformProperties) { CURRENT_EES = new String[platformProperties.length][]; for (int i = 0; i < platformProperties.length; i++) { String eeSpecs = (String) platformProperties[i].get(Constants.FRAMEWORK_EXECUTIONENVIRONMENT); CURRENT_EES[i] = ManifestElement.getArrayFromList(eeSpecs, ","); //$NON-NLS-1$ } }
private void getCurrentEEs(Dictionary<Object, Object>[] platformProperties) { CURRENT_EES = new String[platformProperties.length][]; for (int i = 0; i < platformProperties.length; i++) { String eeSpecs = (String) platformProperties[i].get(Constants.FRAMEWORK_EXECUTIONENVIRONMENT); CURRENT_EES[i] = ManifestElement.getArrayFromList(eeSpecs, ","); //$NON-NLS-1$ } }
private static String[][] getGenericAliases(StateImpl state) { String genericAliasesProp = getPlatformProperty(state, "osgi.genericAliases"); //$NON-NLS-1$ if (genericAliasesProp == null) return new String[0][0]; String[] aliases = ManifestElement.getArrayFromList(genericAliasesProp, ","); //$NON-NLS-1$ String[][] result = new String[aliases.length][]; for (int i = 0; i < aliases.length; i++) result[i] = ManifestElement.getArrayFromList(aliases[i], ":"); //$NON-NLS-1$ return result; }
private static String[][] getGenericAliases(StateImpl state) { String genericAliasesProp = getPlatformProperty(state, "osgi.genericAliases"); //$NON-NLS-1$ if (genericAliasesProp == null) return new String[0][0]; String[] aliases = ManifestElement.getArrayFromList(genericAliasesProp, ","); //$NON-NLS-1$ String[][] result = new String[aliases.length][]; for (int i = 0; i < aliases.length; i++) result[i] = ManifestElement.getArrayFromList(aliases[i], ":"); //$NON-NLS-1$ return result; }
private String splitOnComma(String value) { if (value.length() < MAXLINE || value.indexOf(LINE_SEPARATOR) >= 0) return value; // assume the line is already split String[] values = ManifestElement.getArrayFromList(value); if (values == null || values.length == 0) return value; StringBuffer sb = new StringBuffer(value.length() + ((values.length - 1) * LIST_SEPARATOR.length())); for (int i = 0; i < values.length - 1; i++) sb.append(values[i]).append(LIST_SEPARATOR); sb.append(values[values.length - 1]); return sb.toString(); }
/** * @deprecated */ public BundleDescription createBundleDescription(long id, String symbolicName, Version version, String location, BundleSpecification[] required, HostSpecification host, ImportPackageSpecification[] imports, ExportPackageDescription[] exports, String[] providedPackages, boolean singleton, boolean attachFragments, boolean dynamicFragments, String platformFilter, String executionEnvironment, GenericSpecification[] genericRequires, GenericDescription[] genericCapabilities) { // bug 154137 we need to parse the executionEnvironment param; no need to check for null, ManifestElement does that for us. return createBundleDescription(id, symbolicName, version, location, required, host, imports, exports, singleton, attachFragments, dynamicFragments, platformFilter, ManifestElement.getArrayFromList(executionEnvironment), genericRequires, genericCapabilities); }
GenericCapability(ResolverBundle resolverBundle, GenericDescription base) { super(base); this.resolverBundle = resolverBundle; String usesDirective = base.getDeclaredDirectives().get(Constants.USES_DIRECTIVE); uses = ManifestElement.getArrayFromList(usesDirective); String effectiveDirective = base.getDeclaredDirectives().get(Constants.EFFECTIVE_DIRECTIVE); effective = effectiveDirective == null || Constants.EFFECTIVE_RESOLVE.equals(effectiveDirective); }