本文整理了Java中org.eclipse.osgi.service.resolver.State.getFactory()
方法的一些代码示例,展示了State.getFactory()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。State.getFactory()
方法的具体详情如下:
包路径:org.eclipse.osgi.service.resolver.State
类名称:State
方法名:getFactory
[英]Returns the factory that created this state.
[中]返回创建此状态的工厂。
代码示例来源:origin: org.eclipse/org.eclipse.osgi
public StateObjectFactory getFactory() {
return target.getFactory();
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.osgi.compatibility.state
public StateObjectFactory getFactory() {
return platformAdmin.getSystemState().getFactory();
}
代码示例来源:origin: com.github.veithen.cosmos.bootstrap/org.eclipse.osgi.compatibility.state
public StateObjectFactory getFactory() {
return platformAdmin.getSystemState().getFactory();
}
代码示例来源:origin: org.eclipse/org.eclipse.osgi
public void internalWriteStateDeprecated(State state, DataOutputStream stream) throws IOException {
if (state.getFactory() != this)
throw new IllegalArgumentException();
StateWriter writer = new StateWriter();
writer.saveStateDeprecated((StateImpl) state, stream);
}
代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.osgi
public void internalWriteStateDeprecated(State state, DataOutputStream stream) throws IOException {
if (state.getFactory() != this)
throw new IllegalArgumentException();
StateWriter writer = new StateWriter();
writer.saveStateDeprecated((StateImpl) state, stream);
}
}
代码示例来源:origin: com.github.veithen.cosmos.bootstrap/org.eclipse.osgi.compatibility.state
private void internalWriteStateDeprecated(State state, DataOutputStream stream) throws IOException {
if (state.getFactory() != this)
throw new IllegalArgumentException();
StateWriter writer = new StateWriter();
writer.saveStateDeprecated((StateImpl) state, stream);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.osgi.compatibility.state
private void internalWriteStateDeprecated(State state, DataOutputStream stream) throws IOException {
if (state.getFactory() != this)
throw new IllegalArgumentException();
StateWriter writer = new StateWriter();
writer.saveStateDeprecated((StateImpl) state, stream);
}
代码示例来源:origin: com.github.veithen.cosmos.bootstrap/org.eclipse.osgi.compatibility.state
private List<BundleSpecification> createRequireBundle(Requirement requirement) {
String declaration = createOSGiRequirement(requirement, BundleNamespace.BUNDLE_NAMESPACE, BundleNamespace.CAPABILITY_BUNDLE_VERSION_ATTRIBUTE);
List<BundleSpecification> result = state.getFactory().createBundleSpecifications(declaration);
for (BundleSpecification bundleSpecification : result) {
bundleSpecification.setUserObject(requirement);
}
return result;
}
代码示例来源:origin: com.github.veithen.cosmos.bootstrap/org.eclipse.osgi.compatibility.state
private List<ImportPackageSpecification> createImportPackage(Requirement requirement) {
String declaration = createOSGiRequirement(requirement, PackageNamespace.PACKAGE_NAMESPACE, PackageNamespace.CAPABILITY_VERSION_ATTRIBUTE, PackageNamespace.CAPABILITY_BUNDLE_VERSION_ATTRIBUTE);
List<ImportPackageSpecification> result = state.getFactory().createImportPackageSpecifications(declaration);
for (ImportPackageSpecification importPackageSpecification : result) {
importPackageSpecification.setUserObject(requirement);
}
return result;
}
代码示例来源:origin: com.github.veithen.cosmos.bootstrap/org.eclipse.osgi.compatibility.state
private List<ExportPackageDescription> creatExportPackage(Capability capability) {
Map<String, Object> attributes = new HashMap<String, Object>(capability.getAttributes());
Map<String, String> directives = capability.getDirectives();
String packageName = (String) attributes.remove(PackageNamespace.PACKAGE_NAMESPACE);
// remove invalid attributes
attributes.remove(PackageNamespace.CAPABILITY_BUNDLE_SYMBOLICNAME_ATTRIBUTE);
attributes.remove(AbstractWiringNamespace.CAPABILITY_BUNDLE_VERSION_ATTRIBUTE);
String declaration = packageName + toString(attributes, "=", true) + toString(directives, ":=", true); //$NON-NLS-1$//$NON-NLS-2$
List<ExportPackageDescription> result = state.getFactory().createExportPackageDescriptions(declaration);
for (ExportPackageDescription export : result) {
export.setUserObject(capability);
}
return result;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.osgi.compatibility.state
private List<BundleSpecification> createRequireBundle(Requirement requirement) {
String declaration = createOSGiRequirement(requirement, BundleNamespace.BUNDLE_NAMESPACE, BundleNamespace.CAPABILITY_BUNDLE_VERSION_ATTRIBUTE);
List<BundleSpecification> result = state.getFactory().createBundleSpecifications(declaration);
for (BundleSpecification bundleSpecification : result) {
bundleSpecification.setUserObject(requirement);
}
return result;
}
代码示例来源:origin: com.github.veithen.cosmos.bootstrap/org.eclipse.osgi.compatibility.state
private List<HostSpecification> createFragmentHost(Requirement requirement) {
String declaration = createOSGiRequirement(requirement, HostNamespace.HOST_NAMESPACE, HostNamespace.CAPABILITY_BUNDLE_VERSION_ATTRIBUTE);
List<HostSpecification> result = state.getFactory().createHostSpecifications(declaration);
for (HostSpecification hostSpecification : result) {
hostSpecification.setUserObject(requirement);
}
return result;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.osgi.compatibility.state
private List<HostSpecification> createFragmentHost(Requirement requirement) {
String declaration = createOSGiRequirement(requirement, HostNamespace.HOST_NAMESPACE, HostNamespace.CAPABILITY_BUNDLE_VERSION_ATTRIBUTE);
List<HostSpecification> result = state.getFactory().createHostSpecifications(declaration);
for (HostSpecification hostSpecification : result) {
hostSpecification.setUserObject(requirement);
}
return result;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.osgi.compatibility.state
private List<ImportPackageSpecification> createImportPackage(Requirement requirement) {
String declaration = createOSGiRequirement(requirement, PackageNamespace.PACKAGE_NAMESPACE, PackageNamespace.CAPABILITY_VERSION_ATTRIBUTE, PackageNamespace.CAPABILITY_BUNDLE_VERSION_ATTRIBUTE);
List<ImportPackageSpecification> result = state.getFactory().createImportPackageSpecifications(declaration);
for (ImportPackageSpecification importPackageSpecification : result) {
importPackageSpecification.setUserObject(requirement);
}
return result;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.osgi.compatibility.state
private List<GenericSpecification> createRequireCapability(Requirement requirement) {
Map<String, String> directives = new HashMap<>(requirement.getDirectives());
String filter = directives.get(Namespace.REQUIREMENT_FILTER_DIRECTIVE);
if (filter != null) {
directives.put(Namespace.REQUIREMENT_FILTER_DIRECTIVE, escapeFilterInput(filter));
}
String declaration = requirement.getNamespace() + toString(requirement.getAttributes(), "=", false) + toString(directives, ":=", true); //$NON-NLS-1$ //$NON-NLS-2$
List<GenericSpecification> result = state.getFactory().createGenericSpecifications(declaration);
for (GenericSpecification genericSpecification : result) {
genericSpecification.setUserObject(requirement);
}
return result;
}
代码示例来源:origin: org.eclipse/org.eclipse.pde.core
protected void copyState(State state) {
fStateCopy = state.getFactory().createState(state);
fStateCopy.setResolver(Platform.getPlatformAdmin().getResolver());
fStateCopy.setPlatformProperties(state.getPlatformProperties());
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.pde.core
protected void copyState(State state) {
fStateCopy = state.getFactory().createState(state);
fStateCopy.setResolver(Platform.getPlatformAdmin().createResolver());
fStateCopy.setPlatformProperties(state.getPlatformProperties());
}
代码示例来源:origin: com.github.veithen.cosmos.bootstrap/org.eclipse.osgi.compatibility.state
private List<GenericSpecification> createRequireCapability(Requirement requirement) {
String declaration = requirement.getNamespace() + toString(requirement.getAttributes(), "=", false) + toString(requirement.getDirectives(), ":=", true); //$NON-NLS-1$ //$NON-NLS-2$
List<GenericSpecification> result = state.getFactory().createGenericSpecifications(declaration);
for (GenericSpecification genericSpecification : result) {
genericSpecification.setUserObject(requirement);
}
return result;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.osgi.compatibility.state
private List<GenericDescription> createProvideCapability(Capability capability) {
Map<String, Object> attributes = capability.getAttributes();
Map<String, String> directives = capability.getDirectives();
String declaration = capability.getNamespace() + toString(attributes, "=", false) + toString(directives, ":=", true); //$NON-NLS-1$//$NON-NLS-2$
List<GenericDescription> result = state.getFactory().createGenericDescriptions(declaration);
for (GenericDescription genericDescription : result) {
genericDescription.setUserObject(capability);
}
return result;
}
代码示例来源:origin: com.github.veithen.cosmos.bootstrap/org.eclipse.osgi.compatibility.state
private List<GenericDescription> createProvideCapability(Capability capability) {
Map<String, Object> attributes = capability.getAttributes();
Map<String, String> directives = capability.getDirectives();
String declaration = capability.getNamespace() + toString(attributes, "=", false) + toString(directives, ":=", true); //$NON-NLS-1$//$NON-NLS-2$
List<GenericDescription> result = state.getFactory().createGenericDescriptions(declaration);
for (GenericDescription genericDescription : result) {
genericDescription.setUserObject(capability);
}
return result;
}
内容来源于网络,如有侵权,请联系作者删除!