/** * Return an array of licenses for the specified IInstallableUnit, * localized for the receiver's locale. * * @param iu the IInstallableUnit in question * @return the localized licenses defined by the IInstallableUnit */ public ILicense[] getLicenses(IInstallableUnit iu, String locale) { if (locale == null) locale = getCurrentLocale(); Collection<ILicense> licenses = iu.getLicenses(); ILicense[] translatedLicenses = new ILicense[licenses.size()]; int i = 0; for (ILicense iLicense : licenses) { translatedLicenses[i++] = getLicense(iu, iLicense, locale); } return translatedLicenses; }