本文整理了Java中org.osgi.framework.Version.getMicro()
方法的一些代码示例,展示了Version.getMicro()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Version.getMicro()
方法的具体详情如下:
包路径:org.osgi.framework.Version
类名称:Version
方法名:getMicro
[英]Returns the micro component of this version identifier.
[中]返回此版本标识符的微组件。
代码示例来源:origin: org.osgi/org.osgi.core
} else {
Version adjacent1 = new Version(left.getMajor(), left.getMinor(), left.getMicro(), left.getQualifier() + "-");
return adjacent1.compareTo(right) >= 0;
if (rightClosed) {
Version adjacent1 = new Version(left.getMajor(), left.getMinor(), left.getMicro(), left.getQualifier() + "-");
return adjacent1.equals(right);
} else {
Version adjacent2 = new Version(left.getMajor(), left.getMinor(), left.getMicro(), left.getQualifier() + "--");
return adjacent2.compareTo(right) >= 0;
代码示例来源:origin: com.github.veithen.cosmos.bootstrap/org.eclipse.equinox.common
/**
* Returns the service level component of this
* version identifier.
*
* @return the service level
*/
public int getServiceComponent() {
return version.getMicro();
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.equinox.common
/**
* Returns the service level component of this
* version identifier.
*
* @return the service level
*/
public int getServiceComponent() {
return version.getMicro();
}
代码示例来源:origin: org.eclipse.equinox/common
/**
* Returns the service level component of this
* version identifier.
*
* @return the service level
*/
public int getServiceComponent() {
return version.getMicro();
}
代码示例来源:origin: org.apache.ode/ode-jbi-bundle
private String getDUName() {
if (this.duName == null)
this.duName = getName() + "-" + bundle.getVersion().getMicro();
return this.duName;
}
代码示例来源:origin: org.eclipse.pde/org.eclipse.pde.api.tools
@Override
public synchronized String getVersion() {
init();
// remove the qualifier
StringBuilder buffer = new StringBuilder();
buffer.append(fVersion.getMajor()).append('.').append(fVersion.getMinor()).append('.').append(fVersion.getMicro());
return String.valueOf(buffer);
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.pde.core
public static boolean isEquivalentTo(Version v1, Version v2) {
if (v1.getMajor() != v2.getMajor() || v1.getMinor() != v2.getMinor())
return false;
if (v1.getMicro() > v2.getMicro())
return true;
if (v1.getMicro() < v2.getMicro())
return false;
return v1.getQualifier().compareTo(v2.getQualifier()) >= 0;
}
代码示例来源:origin: com.github.veithen.cosmos.bootstrap/org.eclipse.equinox.p2.publisher
/**
* Create an omni version from an OSGi <code>version</code>.
* @param version The OSGi version. Can be <code>null</code>.
* @return The created omni version
*/
public static Version fromOSGiVersion(org.osgi.framework.Version version) {
if (version == null)
return null;
if (version.getMajor() == Integer.MAX_VALUE && version.getMicro() == Integer.MAX_VALUE && version.getMicro() == Integer.MAX_VALUE)
return Version.MAX_VERSION;
return Version.createOSGi(version.getMajor(), version.getMinor(), version.getMicro(), version.getQualifier());
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.pde.core
private static Version fromOSGiVersion(org.osgi.framework.Version version) {
if (version == null)
return Version.MAX_VERSION;
if (version.getMajor() == Integer.MAX_VALUE && version.getMicro() == Integer.MAX_VALUE && version.getMicro() == Integer.MAX_VALUE)
return Version.MAX_VERSION;
return Version.createOSGi(version.getMajor(), version.getMinor(), version.getMicro(), version.getQualifier());
}
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.equinox.p2.publisher
/**
* Create an omni version from an OSGi <code>version</code>.
* @param version The OSGi version. Can be <code>null</code>.
* @return The created omni version
*/
public static Version fromOSGiVersion(org.osgi.framework.Version version) {
if (version == null)
return null;
if (version.getMajor() == Integer.MAX_VALUE && version.getMicro() == Integer.MAX_VALUE && version.getMicro() == Integer.MAX_VALUE)
return Version.MAX_VERSION;
return Version.createOSGi(version.getMajor(), version.getMinor(), version.getMicro(), version.getQualifier());
}
代码示例来源:origin: org.eclipse.equinox.p2/publisher
/**
* Create an omni version from an OSGi <code>version</code>.
* @param version The OSGi version. Can be <code>null</code>.
* @return The created omni version
*/
public static Version fromOSGiVersion(org.osgi.framework.Version version) {
if (version == null)
return null;
if (version.getMajor() == Integer.MAX_VALUE && version.getMicro() == Integer.MAX_VALUE && version.getMicro() == Integer.MAX_VALUE)
return Version.MAX_VERSION;
return Version.createOSGi(version.getMajor(), version.getMinor(), version.getMicro(), version.getQualifier());
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.pde.core
public static int compareMacroMinorMicro(Version v1, Version v2) {
int result = v1.getMajor() - v2.getMajor();
if (result != 0)
return result;
result = v1.getMinor() - v2.getMinor();
if (result != 0)
return result;
result = v1.getMicro() - v2.getMicro();
return result;
}
代码示例来源:origin: org.eclipse/org.eclipse.osgi
private static void getImportFrom(ExportPackageDescription export, StringBuffer importStatement) {
importStatement.append(export.getName()).append(ELEMENT_SEPARATOR);
Version version = export.getVersion();
importStatement.append(Constants.VERSION_ATTRIBUTE).append(EQUALS_QUOTE).append('[').append(version).append(',').append(new Version(version.getMajor(), version.getMinor(), version.getMicro() + 1)).append(')').append('\"');
addMap(importStatement, export.getAttributes(), "="); //$NON-NLS-1$
}
代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.osgi
private void writeVersion(Version version, DataOutputStream out) throws IOException {
if (version == null || version.equals(Version.emptyVersion)) {
out.writeByte(StateReader.NULL);
return;
}
out.writeByte(StateReader.OBJECT);
out.writeInt(version.getMajor());
out.writeInt(version.getMinor());
out.writeInt(version.getMicro());
writeQualifier(version.getQualifier(), out);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.osgi.compatibility.state
private void writeVersion(Version version, DataOutputStream out) throws IOException {
if (version == null || version.equals(Version.emptyVersion)) {
out.writeByte(StateReader.NULL);
return;
}
out.writeByte(StateReader.OBJECT);
out.writeInt(version.getMajor());
out.writeInt(version.getMinor());
out.writeInt(version.getMicro());
writeQualifier(version.getQualifier(), out);
}
代码示例来源:origin: org.eclipse/osgi
private static void writeVersion(Version version, DataOutputStream out) throws IOException {
if (version == null || version.equals(Version.emptyVersion)) {
out.writeByte(NULL);
return;
}
out.writeByte(OBJECT);
out.writeInt(version.getMajor());
out.writeInt(version.getMinor());
out.writeInt(version.getMicro());
writeQualifier(version.getQualifier(), out);
}
代码示例来源:origin: org.sonatype.tycho/maven-osgi-source-plugin
private Version getExpandedVersion(String versionStr)
{
Version version = Version.parseVersion( versionStr );
if ( VERSION_QUALIFIER.equals(version.getQualifier()) )
{
return new Version(version.getMajor(), version.getMinor(), version.getMicro(), qualifier);
}
return version;
}
代码示例来源:origin: org.eclipse.pde/org.eclipse.pde.ui
private String computeInitialPluginVersion(String pluginVersion) {
if (pluginVersion != null && VersionUtil.validateVersion(pluginVersion).isOK()) {
Version pvi = Version.parseVersion(pluginVersion);
return pvi.getMajor() + "." + pvi.getMinor() //$NON-NLS-1$
+ "." + pvi.getMicro(); //$NON-NLS-1$
}
return pluginVersion;
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.pde.core
public static String computeInitialPluginVersion(String version) {
if (version != null && VersionUtil.validateVersion(version).isOK()) {
Version pvi = Version.parseVersion(version);
return pvi.getMajor() + "." + pvi.getMinor() //$NON-NLS-1$
+ "." + pvi.getMicro(); //$NON-NLS-1$
}
return version;
}
代码示例来源:origin: com.springsource.bundlor/com.springsource.bundlor
/**
* {@inheritDoc}
*/
public String transform(String propertyName, String value, String pattern) {
Version version = new Version(value);
VersionExpander expander = getVersionExpander(pattern);
return expander.expand(version.getMajor(), version.getMinor(), version.getMicro(), version.getQualifier());
}
内容来源于网络,如有侵权,请联系作者删除!