Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ public class BundleDescriptionBuilder {
Constants.BUNDLE_VERSION_ATTRIBUTE, PACKAGE_SPECIFICATION_VERSION, Constants.VERSION_ATTRIBUTE };
private static final String[] DEFINED_REQUIRE_BUNDLE_DIRECTIVES = {Constants.RESOLUTION_DIRECTIVE, Constants.VISIBILITY_DIRECTIVE};
private static final String[] DEFINED_FRAGMENT_HOST_DIRECTIVES = {Constants.EXTENSION_DIRECTIVE};
static final String[] DEFINED_BSN_DIRECTIVES = {Constants.SINGLETON_DIRECTIVE, Constants.FRAGMENT_ATTACHMENT_DIRECTIVE, Constants.MANDATORY_DIRECTIVE};
static final String[] DEFINED_BSN_MATCHING_ATTRS = {Constants.BUNDLE_VERSION_ATTRIBUTE, BundleDescriptionBuilder.OPTIONAL_ATTRIBUTE, BundleDescriptionBuilder.REPROVIDE_ATTRIBUTE};
private static final String[] DEFINED_BSN_DIRECTIVES = {Constants.SINGLETON_DIRECTIVE, Constants.FRAGMENT_ATTACHMENT_DIRECTIVE, Constants.MANDATORY_DIRECTIVE};
private static final String[] DEFINED_BSN_MATCHING_ATTRS = {Constants.BUNDLE_VERSION_ATTRIBUTE, BundleDescriptionBuilder.OPTIONAL_ATTRIBUTE, BundleDescriptionBuilder.REPROVIDE_ATTRIBUTE};
private static final String[] DEFINED_REQUIRE_CAPABILITY_DIRECTIVES = {Constants.RESOLUTION_DIRECTIVE, Constants.FILTER_DIRECTIVE, Namespace.REQUIREMENT_CARDINALITY_DIRECTIVE};
private static final String[] DEFINED_REQUIRE_CAPABILITY_ATTRS = {};
private static final String[] DEFINED_OSGI_VALIDATE_HEADERS = {Constants.IMPORT_PACKAGE, Constants.DYNAMICIMPORT_PACKAGE, Constants.EXPORT_PACKAGE, Constants.FRAGMENT_HOST, Constants.BUNDLE_SYMBOLICNAME, Constants.REQUIRE_BUNDLE};
static final String GENERIC_REQUIRE = "Eclipse-GenericRequire"; //$NON-NLS-1$
static final String GENERIC_CAPABILITY = "Eclipse-GenericCapability"; //$NON-NLS-1$
private static final String GENERIC_REQUIRE = "Eclipse-GenericRequire"; //$NON-NLS-1$
private static final String GENERIC_CAPABILITY = "Eclipse-GenericCapability"; //$NON-NLS-1$

private static final String ATTR_TYPE_STRING = "string"; //$NON-NLS-1$
private static final String ATTR_TYPE_VERSION = "version"; //$NON-NLS-1$
Expand Down Expand Up @@ -241,7 +241,7 @@ private static BundleSpecification[] createRequiredBundles(ManifestElement[] spe
return result;
}

static BundleSpecification createRequiredBundle(ManifestElement spec) {
private static BundleSpecification createRequiredBundle(ManifestElement spec) {
BundleSpecificationImpl result = new BundleSpecificationImpl();
result.setName(spec.getValue());
result.setVersionRange(getVersionRange(spec.getAttribute(Constants.BUNDLE_VERSION_ATTRIBUTE)));
Expand Down Expand Up @@ -289,7 +289,7 @@ private static ImportPackageSpecification[] createImportPackages(ExportPackageDe
return allImports.toArray(new ImportPackageSpecification[allImports.size()]);
}

public static void addImportPackages(ManifestElement importPackage, List<ImportPackageSpecification> allImports, int manifestVersion, boolean dynamic) {
private static void addImportPackages(ManifestElement importPackage, List<ImportPackageSpecification> allImports, int manifestVersion, boolean dynamic) {
String[] importNames = importPackage.getValueComponents();
for (String importName : importNames) {
// do not allow for multiple imports of same package of manifest version < 2
Expand Down Expand Up @@ -333,7 +333,7 @@ private static String getResolution(String resolution) {
return result;
}

static ExportPackageDescription[] createExportPackages(ManifestElement[] exported, ManifestElement[] provides, List<String> providedExports, boolean strict) {
private static ExportPackageDescription[] createExportPackages(ManifestElement[] exported, ManifestElement[] provides, List<String> providedExports, boolean strict) {
int numExports = (exported == null ? 0 : exported.length) + (provides == null ? 0 : provides.length);
if (numExports == 0) {
return null;
Expand All @@ -350,7 +350,7 @@ static ExportPackageDescription[] createExportPackages(ManifestElement[] exporte
return allExports.toArray(new ExportPackageDescription[allExports.size()]);
}

static void addExportPackages(ManifestElement exportPackage, List<ExportPackageDescription> allExports, boolean strict) {
private static void addExportPackages(ManifestElement exportPackage, List<ExportPackageDescription> allExports, boolean strict) {
String[] exportNames = exportPackage.getValueComponents();
for (String exportName : exportNames) {
// if we are in strict mode and the package is marked as internal, skip it.
Expand Down Expand Up @@ -397,7 +397,7 @@ private static void addProvidePackages(ManifestElement[] provides, List<ExportPa
}
}

static Map<String, String> getDirectives(ManifestElement element, String[] definedDirectives) {
private static Map<String, String> getDirectives(ManifestElement element, String[] definedDirectives) {
Enumeration<String> keys = element.getDirectiveKeys();
if (keys == null) {
return null;
Expand All @@ -418,7 +418,7 @@ static Map<String, String> getDirectives(ManifestElement element, String[] defin
return arbitraryDirectives;
}

static Map<String, Object> getAttributes(ManifestElement element, String[] definedAttrs) {
private static Map<String, Object> getAttributes(ManifestElement element, String[] definedAttrs) {
Enumeration<String> keys = element.getKeys();
Map<String, Object> arbitraryAttrs = null;
if (keys == null) {
Expand Down Expand Up @@ -502,7 +502,7 @@ private static Object convertValue(String type, String value) {
return components;
}

static HostSpecification createHostSpecification(ManifestElement spec) {
private static HostSpecification createHostSpecification(ManifestElement spec) {
if (spec == null) {
return null;
}
Expand All @@ -523,7 +523,7 @@ private static GenericSpecification[] createGenericRequires(ManifestElement[] eq
return result == null ? null : result.toArray(new GenericSpecification[result.size()]);
}

static List<GenericSpecification> convertBREEs(String[] brees, List<GenericSpecification> result) throws BundleException {
private static List<GenericSpecification> convertBREEs(String[] brees, List<GenericSpecification> result) throws BundleException {
if (brees == null || brees.length == 0) {
return result;
}
Expand Down Expand Up @@ -595,7 +595,7 @@ private static String createOSGiEERequirementFilter(String bree) throws BundleEx
return filterSpec;
}

static String[] getOSGiEENameVersion(String bree) {
private static String[] getOSGiEENameVersion(String bree) {
String ee1 = null;
String ee2 = null;
String v1 = null;
Expand Down Expand Up @@ -655,7 +655,7 @@ static String[] getOSGiEENameVersion(String bree) {
return new String[] {eeName, v1};
}

static List<GenericSpecification> createOSGiRequires(ManifestElement[] osgiRequires, List<GenericSpecification> result) throws BundleException {
private static List<GenericSpecification> createOSGiRequires(ManifestElement[] osgiRequires, List<GenericSpecification> result) throws BundleException {
if (osgiRequires == null) {
return result;
}
Expand Down Expand Up @@ -743,7 +743,7 @@ private static GenericDescription[] createGenericCapabilities(ManifestElement[]
return result == null ? null : result.toArray(new GenericDescription[result.size()]);
}

static List<GenericDescription> createOSGiCapabilities(ManifestElement[] osgiCapabilities, List<GenericDescription> result, BundleDescription description) throws BundleException {
private static List<GenericDescription> createOSGiCapabilities(ManifestElement[] osgiCapabilities, List<GenericDescription> result, BundleDescription description) throws BundleException {
if (result == null) {
result = new ArrayList<>(osgiCapabilities == null ? 1 : osgiCapabilities.length + 1);
}
Expand All @@ -756,7 +756,7 @@ static List<GenericDescription> createOSGiCapabilities(ManifestElement[] osgiCap
return createOSGiCapabilities(osgiCapabilities, result, (Integer) null);
}

static List<GenericDescription> createOSGiCapabilities(ManifestElement[] osgiCapabilities, List<GenericDescription> result, Integer profileIndex) throws BundleException {
private static List<GenericDescription> createOSGiCapabilities(ManifestElement[] osgiCapabilities, List<GenericDescription> result, Integer profileIndex) throws BundleException {
if (osgiCapabilities == null) {
return result;
}
Expand Down Expand Up @@ -833,7 +833,7 @@ private static VersionRange getVersionRange(String versionRange) {
return new VersionRange(versionRange);
}

public static void checkImportExportSyntax(String headerKey, ManifestElement[] elements, boolean export, boolean dynamic, boolean jreBundle) throws BundleException {
private static void checkImportExportSyntax(String headerKey, ManifestElement[] elements, boolean export, boolean dynamic, boolean jreBundle) throws BundleException {
if (elements == null) {
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import org.eclipse.osgi.util.NLS;

public class StateMsg extends NLS {
private static final String BUNDLE_NAME = "org.eclipse.osgi.internal.resolver.StateMessages"; //$NON-NLS-1$
private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.p2.publisher.eclipse.bundledescription.StateMessages"; //$NON-NLS-1$

public static String HEADER_REQUIRED;
public static String HEADER_PACKAGE_DUPLICATES;
Expand Down