private boolean isSystemExport(ExportPackageDescription export, int options) { if ((options & VISIBLE_INCLUDE_EE_PACKAGES) != 0) return false; return ((Integer) export.getDirective(ExportPackageDescriptionImpl.EQUINOX_EE)).intValue() >= 0; }
private boolean isSystemExport(ExportPackageDescription export, int options) { if ((options & VISIBLE_INCLUDE_EE_PACKAGES) != 0) return false; return ((Integer) export.getDirective(ExportPackageDescriptionImpl.EQUINOX_EE)).intValue() >= 0; }
private boolean isFriend(String consumerBSN, ExportPackageDescription export, boolean strict) { if (!strict) return true; // ignore friends rules if not in strict mode String[] friends = (String[]) export.getDirective(StateImpl.FRIENDS_DIRECTIVE); if (friends == null) return true; // no x-friends means it is wide open for (int i = 0; i < friends.length; i++) if (friends[i].equals(consumerBSN)) return true; // the consumer is a friend return false; }
private boolean isFriend(String consumerBSN, ExportPackageDescription export, boolean strict) { if (!strict) return true; // ignore friends rules if not in strict mode String[] friends = (String[]) export.getDirective(Constants.FRIENDS_DIRECTIVE); if (friends == null) return true; // no x-friends means it is wide open for (int i = 0; i < friends.length; i++) if (friends[i].equals(consumerBSN)) return true; // the consumer is a friend return false; }
private boolean isFriend(String consumerBSN, ExportPackageDescription export, boolean strict) { if (!strict) return true; // ignore friends rules if not in strict mode String[] friends = (String[]) export.getDirective(StateImpl.FRIENDS_DIRECTIVE); if (friends == null) return true; // no x-friends means it is wide open for (int i = 0; i < friends.length; i++) if (friends[i].equals(consumerBSN)) return true; // the consumer is a friend return false; }
private boolean isFriend(String consumerBSN, ExportPackageDescription export, boolean strict) { if (!strict) return true; // ignore friends rules if not in strict mode String[] friends = (String[]) export.getDirective(Constants.FRIENDS_DIRECTIVE); if (friends == null) return true; // no x-friends means it is wide open for (int i = 0; i < friends.length; i++) if (friends[i].equals(consumerBSN)) return true; // the consumer is a friend return false; }
private boolean isSystemExport(ExportPackageDescription export, int options) { if ((options & VISIBLE_INCLUDE_EE_PACKAGES) != 0) return false; return ((Integer) export.getDirective(ExportPackageDescriptionImpl.EQUINOX_EE)).intValue() >= 0; }
boolean forceSourceCreation(ExportPackageDescription export) { boolean strict = Constants.STRICT_MODE.equals(secureAction.getProperty(Constants.OSGI_RESOLVER_MODE)); return (export.getDirective(Constants.INCLUDE_DIRECTIVE) != null) || (export.getDirective(Constants.EXCLUDE_DIRECTIVE) != null) || (strict && export.getDirective(Constants.FRIENDS_DIRECTIVE) != null); }
boolean forceSourceCreation(ExportPackageDescription export) { boolean strict = Constants.STRICT_MODE.equals(secureAction.getProperty(Constants.OSGI_RESOLVER_MODE)); return (export.getDirective(Constants.INCLUDE_DIRECTIVE) != null) || (export.getDirective(Constants.EXCLUDE_DIRECTIVE) != null) || (strict && export.getDirective(Constants.FRIENDS_DIRECTIVE) != null); }
private boolean restrictPackage(BundleDescription desc, ExportPackageDescription pkg ) { String[] friends = (String[])pkg.getDirective(ICoreConstants.FRIENDS_DIRECTIVE); if (friends != null) { String symbolicName = desc.getSymbolicName(); for (int i = 0; i < friends.length; i++) { if (symbolicName.equals(friends[i])) return false; } return true; } return (((Boolean)pkg.getDirective(ICoreConstants.INTERNAL_DIRECTIVE)).booleanValue()); }
private boolean restrictPackage(BundleDescription desc, ExportPackageDescription pkg) { String[] friends = (String[]) pkg.getDirective(ICoreConstants.FRIENDS_DIRECTIVE); if (friends != null) { String symbolicName = desc.getSymbolicName(); for (int i = 0; i < friends.length; i++) { if (symbolicName.equals(friends[i])) return false; } return true; } return (((Boolean) pkg.getDirective(ICoreConstants.INTERNAL_DIRECTIVE)).booleanValue()); }
String[] getUsesDirective() { return (String[]) getExportPackageDescription().getDirective(Constants.USES_DIRECTIVE); } }
String[] getUsesDirective() { return (String[]) getExportPackageDescription().getDirective(Constants.USES_DIRECTIVE); } }
public int getAccessCode(BundleDescription bundle, ExportPackageDescription export) { if (((Boolean) export.getDirective(Constants.INTERNAL_DIRECTIVE)).booleanValue()) return ACCESS_DISCOURAGED; if (!isFriend(bundle.getSymbolicName(), export, true)) // pass strict here so that x-friends is processed return ACCESS_DISCOURAGED; return ACCESS_ENCOURAGED; }
public int getAccessCode(BundleDescription bundle, ExportPackageDescription export) { if (((Boolean) export.getDirective(StateImpl.INTERNAL_DIRECTIVE)).booleanValue()) return ACCESS_DISCOURAGED; if (!isFriend(bundle.getSymbolicName(), export, true)) // pass strict here so that x-friends is processed return ACCESS_DISCOURAGED; return ACCESS_ENCOURAGED; }
public int getAccessCode(BundleDescription bundle, ExportPackageDescription export) { if (((Boolean) export.getDirective(Constants.INTERNAL_DIRECTIVE)).booleanValue()) return ACCESS_DISCOURAGED; if (!isFriend(bundle.getSymbolicName(), export, true)) // pass strict here so that x-friends is processed return ACCESS_DISCOURAGED; return ACCESS_ENCOURAGED; }
public int getAccessCode(BundleDescription bundle, ExportPackageDescription export) { if (((Boolean) export.getDirective(StateImpl.INTERNAL_DIRECTIVE)).booleanValue()) return ACCESS_DISCOURAGED; if (!isFriend(bundle.getSymbolicName(), export, true)) // pass strict here so that x-friends is processed return ACCESS_DISCOURAGED; return ACCESS_ENCOURAGED; }
private void resetSystemExports() { BundleDescription[] systemBundles = getBundles(Constants.SYSTEM_BUNDLE_SYMBOLICNAME); for (int idx = 0; idx < systemBundles.length; idx++) { BundleDescriptionImpl systemBundle = (BundleDescriptionImpl) systemBundles[idx]; ExportPackageDescription[] exports = systemBundle.getExportPackages(); List<ExportPackageDescription> newExports = new ArrayList<ExportPackageDescription>(exports.length); for (int i = 0; i < exports.length; i++) if (((Integer) exports[i].getDirective(ExportPackageDescriptionImpl.EQUINOX_EE)).intValue() < 0) newExports.add(exports[i]); addSystemExports(newExports); systemBundle.setExportPackages(newExports.toArray(new ExportPackageDescription[newExports.size()])); } }
private void resetSystemExports() { BundleDescription[] systemBundles = getBundles(Constants.SYSTEM_BUNDLE_SYMBOLICNAME); for (int idx = 0; idx < systemBundles.length; idx++) { BundleDescriptionImpl systemBundle = (BundleDescriptionImpl) systemBundles[idx]; ExportPackageDescription[] exports = systemBundle.getExportPackages(); List<ExportPackageDescription> newExports = new ArrayList<>(exports.length); for (int i = 0; i < exports.length; i++) if (((Integer) exports[i].getDirective(ExportPackageDescriptionImpl.EQUINOX_EE)).intValue() < 0) newExports.add(exports[i]); addSystemExports(newExports); systemBundle.setExportPackages(newExports.toArray(new ExportPackageDescription[newExports.size()])); } }
private void resetSystemExports() { BundleDescription[] systemBundles = getBundles(Constants.SYSTEM_BUNDLE_SYMBOLICNAME); for (int idx = 0; idx < systemBundles.length; idx++) { BundleDescriptionImpl systemBundle = (BundleDescriptionImpl) systemBundles[idx]; ExportPackageDescription[] exports = systemBundle.getExportPackages(); List<ExportPackageDescription> newExports = new ArrayList<ExportPackageDescription>(exports.length); for (int i = 0; i < exports.length; i++) if (((Integer) exports[i].getDirective(ExportPackageDescriptionImpl.EQUINOX_EE)).intValue() < 0) newExports.add(exports[i]); addSystemExports(newExports); systemBundle.setExportPackages(newExports.toArray(new ExportPackageDescription[newExports.size()])); } }