本文整理了Java中org.eclipse.osgi.service.resolver.State.getBundles()
方法的一些代码示例,展示了State.getBundles()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。State.getBundles()
方法的具体详情如下:
包路径:org.eclipse.osgi.service.resolver.State
类名称:State
方法名:getBundles
[英]Returns descriptions for all bundles known to this state.
[中]返回此状态已知的所有捆绑包的说明。
代码示例来源:origin: org.eclipse/org.eclipse.osgi
public BundleDescription[] getBundles() {
return target.getBundles();
}
代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.osgi
public BundleDescription[] getBundles() {
return target.getBundles();
}
代码示例来源:origin: org.eclipse.pde/org.eclipse.pde.ui
@Override
public Object[] getElements(Object inputElement) {
if (inputElement instanceof State)
return ((State) inputElement).getBundles();
return new Object[0];
}
代码示例来源:origin: org.codehaus.tycho/tycho-osgi-components
public List<BundleDescription> getBundles()
{
return Arrays.asList( state.getBundles() );
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.osgi.compatibility.state
public BundleDescription[] getBundles(String symbolicName) {
return platformAdmin.getSystemState().getBundles(symbolicName);
}
代码示例来源:origin: com.github.veithen.cosmos.bootstrap/org.eclipse.osgi.compatibility.state
public BundleDescription[] getBundles(String symbolicName) {
return platformAdmin.getSystemState().getBundles(symbolicName);
}
代码示例来源:origin: org.eclipse/org.eclipse.osgi
private BundleDescription getBundleDescriptionFromToken(State state, String token) {
try {
long id = Long.parseLong(token);
return state.getBundle(id);
} catch (NumberFormatException nfe) {
BundleDescription[] allBundles = state.getBundles(token);
if (allBundles.length > 0)
return allBundles[0];
}
return null;
}
代码示例来源:origin: org.eclipse/org.eclipse.pde.core
public Map getResolverErrors() {
Map map = new HashMap();
BundleDescription[] bundles = fState.getBundles();
for (int i = 0; i < bundles.length; i++) {
if (!bundles[i].isResolved()) {
map.put(bundles[i], fState.getResolverErrors(bundles[i]));
}
}
return map;
}
代码示例来源:origin: org.eclipse/org.eclipse.pde.core
public static HashMap getBundleClasspaths(PDEState state) {
HashMap properties = new HashMap();
BundleDescription[] bundles = state.getState().getBundles();
for (int i = 0; i < bundles.length; i++) {
properties.put(new Long(bundles[i].getBundleId()), getValue(bundles[i], state));
}
return properties;
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.pde.core
public static HashMap<Long, String[]> getBundleClasspaths(PDEState state) {
HashMap<Long, String[]> properties = new HashMap<>();
BundleDescription[] bundles = state.getState().getBundles();
for (int i = 0; i < bundles.length; i++) {
properties.put(new Long(bundles[i].getBundleId()), getValue(bundles[i], state));
}
return properties;
}
代码示例来源:origin: org.eclipse.equinox.frameworkadmin/equinox
private static long getMaxId(State state) {
BundleDescription[] bundleDescriptions = state.getBundles();
long maxId = DEFAULT_TIMESTAMP;
for (int i = 0; i < bundleDescriptions.length; i++)
if (maxId < bundleDescriptions[i].getBundleId()) {
maxId = bundleDescriptions[i].getBundleId();
}
return maxId;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.equinox.frameworkadmin.equinox
private static long getMaxId(State state) {
BundleDescription[] bundleDescriptions = state.getBundles();
long maxId = DEFAULT_TIMESTAMP;
for (int i = 0; i < bundleDescriptions.length; i++)
if (maxId < bundleDescriptions[i].getBundleId()) {
maxId = bundleDescriptions[i].getBundleId();
}
return maxId;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.equinox.frameworkadmin.equinox
@Override
public BundleInfo[] getExpectedState() throws FrameworkAdminRuntimeException {
SimpleBundlesState.checkAvailability(fwAdmin);
return convertState(state.getBundles());
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.equinox.frameworkadmin.equinox
private void createStateIndexes() {
BundleDescription[] currentInstalledBundles = state.getBundles();
for (int i = 0; i < currentInstalledBundles.length; i++) {
URI location = FileUtils.getRealLocation(manipulator, currentInstalledBundles[i].getLocation());
locationStateIndex.put(location, currentInstalledBundles[i]);
nameVersionStateIndex.put(getKey(currentInstalledBundles[i]), currentInstalledBundles[i]);
}
}
代码示例来源:origin: org.eclipse.equinox.frameworkadmin/equinox
public BundleInfo[] getExpectedState() throws FrameworkAdminRuntimeException {
SimpleBundlesState.checkAvailability(fwAdmin);
return convertState(state.getBundles());
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.osgi.compatibility.state
private boolean isBundleConstraintResolvable(VersionConstraint constraint, String namespace, ResolverHook hook) {
BundleDescription[] availableBundles = constraint.getBundle().getContainingState().getBundles(constraint.getName());
return getPossibleCandidates(constraint, availableBundles, namespace, hook, true).size() > 0;
}
代码示例来源:origin: com.github.veithen.cosmos.bootstrap/org.eclipse.osgi.compatibility.state
private boolean isBundleConstraintResolvable(VersionConstraint constraint, String namespace, ResolverHook hook) {
BundleDescription[] availableBundles = constraint.getBundle().getContainingState().getBundles(constraint.getName());
return getPossibleCandidates(constraint, availableBundles, namespace, hook, true).size() > 0;
}
代码示例来源:origin: org.eclipse/org.eclipse.osgi
private boolean isBundleConstraintResolvable(VersionConstraint constraint, String namespace, ResolverHook hook) {
BundleDescription[] availableBundles = constraint.getBundle().getContainingState().getBundles(constraint.getName());
return getPossibleCandidates(constraint, availableBundles, namespace, hook, true).size() > 0;
}
代码示例来源:origin: org.eclipse.tycho/tycho-core
protected void resolveState(State state) {
state.resolve(false);
// warn about missing/ambiguous/inconsistent system.bundle
BundleDescription[] bundles = state.getBundles("system.bundle");
if (bundles == null || bundles.length == 0) {
logger.warn("No system.bundle");
} else if (bundles.length > 1) {
logger.warn("Multiple system.bundles " + Arrays.toString(bundles));
} else if (bundles[0].getBundleId() != SYSTEM_BUNDLE_ID) {
logger.warn("system.bundle bundleId == " + bundles[0].getBundleId());
}
}
代码示例来源:origin: org.eclipse/org.eclipse.osgi
protected void setResolvedBundles(InternalSystemBundle systemBundle) {
checkSystemBundle(systemBundle);
// Now set the actual state of the bundles from the persisted state.
State state = framework.adaptor.getState();
BundleDescription[] descriptions = state.getBundles();
for (int i = 0; i < descriptions.length; i++) {
if (descriptions[i].getBundleId() == 0)
setFrameworkVersion(descriptions[i]);
else
setResolved(descriptions[i]);
}
}
内容来源于网络,如有侵权,请联系作者删除!