本文整理了Java中org.eclipse.osgi.service.resolver.State.resolveConstraint()
方法的一些代码示例,展示了State.resolveConstraint()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。State.resolveConstraint()
方法的具体详情如下:
包路径:org.eclipse.osgi.service.resolver.State
类名称:State
方法名:resolveConstraint
[英]Resolves the given version constraint with the given supplier. The given constraint object is destructively modified to reflect its new resolved state. Note that a constraint can be unresolved by passing null for the supplier.
This method is intended to be used by resolvers in the process of determining which constraints are satisfied by which components.
[中]解决给定供应商的给定版本约束。对给定约束对象进行破坏性修改,以反映其新的解析状态。请注意,通过为供应商传递null,可以解决约束问题。
此方法旨在由解析器在确定哪些组件满足哪些约束的过程中使用。
代码示例来源:origin: org.eclipse/org.eclipse.osgi
private void stateResolveConstraints(ResolverBundle rb) {
ResolverImport[] imports = rb.getImportPackages();
for (int i = 0; i < imports.length; i++) {
ResolverExport export = (ResolverExport) imports[i].getSelectedSupplier();
BaseDescription supplier = export == null ? null : export.getExportPackageDescription();
state.resolveConstraint(imports[i].getVersionConstraint(), supplier);
}
BundleConstraint[] requires = rb.getRequires();
for (int i = 0; i < requires.length; i++) {
ResolverBundle bundle = (ResolverBundle) requires[i].getSelectedSupplier();
BaseDescription supplier = bundle == null ? null : bundle.getBundleDescription();
state.resolveConstraint(requires[i].getVersionConstraint(), supplier);
}
GenericConstraint[] genericRequires = rb.getGenericRequires();
for (int i = 0; i < genericRequires.length; i++) {
VersionSupplier[] matchingCapabilities = genericRequires[i].getMatchingCapabilities();
if (matchingCapabilities == null)
state.resolveConstraint(genericRequires[i].getVersionConstraint(), null);
else
for (int j = 0; j < matchingCapabilities.length; j++)
state.resolveConstraint(genericRequires[i].getVersionConstraint(), matchingCapabilities[j].getBaseDescription());
}
}
代码示例来源:origin: com.github.veithen.cosmos.bootstrap/org.eclipse.osgi.compatibility.state
private void stateResolveConstraints(ResolverBundle rb) {
ResolverImport[] imports = rb.getImportPackages();
for (int i = 0; i < imports.length; i++) {
ResolverExport export = (ResolverExport) imports[i].getSelectedSupplier();
BaseDescription supplier = export == null ? null : export.getExportPackageDescription();
state.resolveConstraint(imports[i].getVersionConstraint(), supplier);
}
BundleConstraint[] requires = rb.getRequires();
for (int i = 0; i < requires.length; i++) {
ResolverBundle bundle = (ResolverBundle) requires[i].getSelectedSupplier();
BaseDescription supplier = bundle == null ? null : bundle.getBundleDescription();
state.resolveConstraint(requires[i].getVersionConstraint(), supplier);
}
GenericConstraint[] genericRequires = rb.getGenericRequires();
for (int i = 0; i < genericRequires.length; i++) {
VersionSupplier[] matchingCapabilities = genericRequires[i].getMatchingCapabilities();
if (matchingCapabilities == null)
state.resolveConstraint(genericRequires[i].getVersionConstraint(), null);
else
for (int j = 0; j < matchingCapabilities.length; j++)
state.resolveConstraint(genericRequires[i].getVersionConstraint(), matchingCapabilities[j].getBaseDescription());
}
}
代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.osgi
private void stateResolveConstraints(ResolverBundle rb) {
ResolverImport[] imports = rb.getImportPackages();
for (int i = 0; i < imports.length; i++) {
ResolverExport export = (ResolverExport) imports[i].getSelectedSupplier();
BaseDescription supplier = export == null ? null : export.getExportPackageDescription();
state.resolveConstraint(imports[i].getVersionConstraint(), supplier);
}
BundleConstraint[] requires = rb.getRequires();
for (int i = 0; i < requires.length; i++) {
ResolverBundle bundle = (ResolverBundle) requires[i].getSelectedSupplier();
BaseDescription supplier = bundle == null ? null : bundle.getBundleDescription();
state.resolveConstraint(requires[i].getVersionConstraint(), supplier);
}
GenericConstraint[] genericRequires = rb.getGenericRequires();
for (int i = 0; i < genericRequires.length; i++) {
VersionSupplier[] matchingCapabilities = genericRequires[i].getMatchingCapabilities();
if (matchingCapabilities == null)
state.resolveConstraint(genericRequires[i].getVersionConstraint(), null);
else
for (int j = 0; j < matchingCapabilities.length; j++)
state.resolveConstraint(genericRequires[i].getVersionConstraint(), matchingCapabilities[j].getBaseDescription());
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.osgi.compatibility.state
private void stateResolveConstraints(ResolverBundle rb) {
ResolverImport[] imports = rb.getImportPackages();
for (int i = 0; i < imports.length; i++) {
ResolverExport export = (ResolverExport) imports[i].getSelectedSupplier();
BaseDescription supplier = export == null ? null : export.getExportPackageDescription();
state.resolveConstraint(imports[i].getVersionConstraint(), supplier);
}
BundleConstraint[] requires = rb.getRequires();
for (int i = 0; i < requires.length; i++) {
ResolverBundle bundle = (ResolverBundle) requires[i].getSelectedSupplier();
BaseDescription supplier = bundle == null ? null : bundle.getBundleDescription();
state.resolveConstraint(requires[i].getVersionConstraint(), supplier);
}
GenericConstraint[] genericRequires = rb.getGenericRequires();
for (int i = 0; i < genericRequires.length; i++) {
VersionSupplier[] matchingCapabilities = genericRequires[i].getMatchingCapabilities();
if (matchingCapabilities == null)
state.resolveConstraint(genericRequires[i].getVersionConstraint(), null);
else
for (int j = 0; j < matchingCapabilities.length; j++)
state.resolveConstraint(genericRequires[i].getVersionConstraint(), matchingCapabilities[j].getBaseDescription());
}
}
代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.osgi
state.resolveConstraint(nativeCode, highestRanked);
代码示例来源:origin: org.eclipse.platform/org.eclipse.osgi.compatibility.state
state.resolveConstraint(nativeCode, highestRanked);
代码示例来源:origin: org.eclipse/org.eclipse.osgi
state.resolveConstraint(nativeCode, highestRanked);
代码示例来源:origin: com.github.veithen.cosmos.bootstrap/org.eclipse.osgi.compatibility.state
state.resolveConstraint(nativeCode, highestRanked);
代码示例来源:origin: com.github.veithen.cosmos.bootstrap/org.eclipse.osgi.compatibility.state
private void stateResolveFragConstraints(ResolverBundle rb) {
ResolverBundle host = (ResolverBundle) rb.getHost().getSelectedSupplier();
ImportPackageSpecification[] imports = rb.getBundleDescription().getImportPackages();
for (int i = 0; i < imports.length; i++) {
ResolverImport hostImport = host == null ? null : host.getImport(imports[i].getName());
ResolverExport export = (ResolverExport) (hostImport == null ? null : hostImport.getSelectedSupplier());
BaseDescription supplier = export == null ? null : export.getExportPackageDescription();
state.resolveConstraint(imports[i], supplier);
}
BundleSpecification[] requires = rb.getBundleDescription().getRequiredBundles();
for (int i = 0; i < requires.length; i++) {
BundleConstraint hostRequire = host == null ? null : host.getRequire(requires[i].getName());
ResolverBundle bundle = (ResolverBundle) (hostRequire == null ? null : hostRequire.getSelectedSupplier());
BaseDescription supplier = bundle == null ? null : bundle.getBundleDescription();
state.resolveConstraint(requires[i], supplier);
}
GenericConstraint[] genericRequires = rb.getGenericRequires();
for (int i = 0; i < genericRequires.length; i++) {
VersionSupplier[] matchingCapabilities = genericRequires[i].getMatchingCapabilities();
if (matchingCapabilities == null)
state.resolveConstraint(genericRequires[i].getVersionConstraint(), null);
else
for (int j = 0; j < matchingCapabilities.length; j++)
state.resolveConstraint(genericRequires[i].getVersionConstraint(), matchingCapabilities[j].getBaseDescription());
}
}
代码示例来源:origin: org.eclipse/org.eclipse.osgi
private void stateResolveFragConstraints(ResolverBundle rb) {
ResolverBundle host = (ResolverBundle) rb.getHost().getSelectedSupplier();
ImportPackageSpecification[] imports = rb.getBundleDescription().getImportPackages();
for (int i = 0; i < imports.length; i++) {
ResolverImport hostImport = host == null ? null : host.getImport(imports[i].getName());
ResolverExport export = (ResolverExport) (hostImport == null ? null : hostImport.getSelectedSupplier());
BaseDescription supplier = export == null ? null : export.getExportPackageDescription();
state.resolveConstraint(imports[i], supplier);
}
BundleSpecification[] requires = rb.getBundleDescription().getRequiredBundles();
for (int i = 0; i < requires.length; i++) {
BundleConstraint hostRequire = host == null ? null : host.getRequire(requires[i].getName());
ResolverBundle bundle = (ResolverBundle) (hostRequire == null ? null : hostRequire.getSelectedSupplier());
BaseDescription supplier = bundle == null ? null : bundle.getBundleDescription();
state.resolveConstraint(requires[i], supplier);
}
GenericConstraint[] genericRequires = rb.getGenericRequires();
for (int i = 0; i < genericRequires.length; i++) {
VersionSupplier[] matchingCapabilities = genericRequires[i].getMatchingCapabilities();
if (matchingCapabilities == null)
state.resolveConstraint(genericRequires[i].getVersionConstraint(), null);
else
for (int j = 0; j < matchingCapabilities.length; j++)
state.resolveConstraint(genericRequires[i].getVersionConstraint(), matchingCapabilities[j].getBaseDescription());
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.osgi.compatibility.state
private void stateResolveFragConstraints(ResolverBundle rb) {
ResolverBundle host = (ResolverBundle) rb.getHost().getSelectedSupplier();
ImportPackageSpecification[] imports = rb.getBundleDescription().getImportPackages();
for (int i = 0; i < imports.length; i++) {
ResolverImport hostImport = host == null ? null : host.getImport(imports[i].getName());
ResolverExport export = (ResolverExport) (hostImport == null ? null : hostImport.getSelectedSupplier());
BaseDescription supplier = export == null ? null : export.getExportPackageDescription();
state.resolveConstraint(imports[i], supplier);
}
BundleSpecification[] requires = rb.getBundleDescription().getRequiredBundles();
for (int i = 0; i < requires.length; i++) {
BundleConstraint hostRequire = host == null ? null : host.getRequire(requires[i].getName());
ResolverBundle bundle = (ResolverBundle) (hostRequire == null ? null : hostRequire.getSelectedSupplier());
BaseDescription supplier = bundle == null ? null : bundle.getBundleDescription();
state.resolveConstraint(requires[i], supplier);
}
GenericConstraint[] genericRequires = rb.getGenericRequires();
for (int i = 0; i < genericRequires.length; i++) {
VersionSupplier[] matchingCapabilities = genericRequires[i].getMatchingCapabilities();
if (matchingCapabilities == null)
state.resolveConstraint(genericRequires[i].getVersionConstraint(), null);
else
for (int j = 0; j < matchingCapabilities.length; j++)
state.resolveConstraint(genericRequires[i].getVersionConstraint(), matchingCapabilities[j].getBaseDescription());
}
}
代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.osgi
private void stateResolveFragConstraints(ResolverBundle rb) {
ResolverBundle host = (ResolverBundle) rb.getHost().getSelectedSupplier();
ImportPackageSpecification[] imports = rb.getBundleDescription().getImportPackages();
for (int i = 0; i < imports.length; i++) {
ResolverImport hostImport = host == null ? null : host.getImport(imports[i].getName());
ResolverExport export = (ResolverExport) (hostImport == null ? null : hostImport.getSelectedSupplier());
BaseDescription supplier = export == null ? null : export.getExportPackageDescription();
state.resolveConstraint(imports[i], supplier);
}
BundleSpecification[] requires = rb.getBundleDescription().getRequiredBundles();
for (int i = 0; i < requires.length; i++) {
BundleConstraint hostRequire = host == null ? null : host.getRequire(requires[i].getName());
ResolverBundle bundle = (ResolverBundle) (hostRequire == null ? null : hostRequire.getSelectedSupplier());
BaseDescription supplier = bundle == null ? null : bundle.getBundleDescription();
state.resolveConstraint(requires[i], supplier);
}
}
内容来源于网络,如有侵权,请联系作者删除!