aQute.bnd.version.Version.getMinor()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(6.7k)|赞(0)|评价(0)|浏览(145)

本文整理了Java中aQute.bnd.version.Version.getMinor()方法的一些代码示例,展示了Version.getMinor()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Version.getMinor()方法的具体详情如下:
包路径:aQute.bnd.version.Version
类名称:Version
方法名:getMinor

Version.getMinor介绍

暂无

代码示例

代码示例来源:origin: biz.aQute/bndlib

public File put(String bsn, Version version) throws IOException {
  File dir = new File(root, bsn);
  if (!dir.exists() && !dir.mkdirs()) {
    throw new IOException("Could not create directory " + dir);
  }
  File file = new File(dir, bsn + "-" + version.getMajor() + "." + version.getMinor() + "." + version.getMicro()
      + ".jar");
  return file;
}

代码示例来源:origin: biz.aQute.bnd/bndlib

public File put(String bsn, Version version) throws IOException {
  File dir = new File(root, bsn);
  if (!dir.exists() && !dir.mkdirs()) {
    throw new IOException("Could not create directory " + dir);
  }
  File file = new File(dir, bsn + "-" + version.getMajor() + "." + version.getMinor() + "." + version.getMicro()
      + ".jar");
  return file;
}

代码示例来源:origin: biz.aQute.bnd/bnd

public File put(String bsn, Version version) throws IOException {
  File dir = new File(root, bsn);
  if (!dir.exists() && !dir.mkdirs()) {
    throw new IOException("Could not create directory " + dir);
  }
  File file = new File(dir, bsn + "-" + version.getMajor() + "." + version.getMinor() + "." + version.getMicro()
      + ".jar");
  return file;
}

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib

public File put(String bsn, Version version) throws IOException {
  File dir = new File(root, bsn);
  IO.mkdirs(dir);
  File file = new File(dir,
    bsn + "-" + version.getMajor() + "." + version.getMinor() + "." + version.getMicro() + ".jar");
  return file;
}

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bnd

public File put(String bsn, Version version) throws IOException {
  File dir = new File(root, bsn);
  IO.mkdirs(dir);
  File file = new File(dir,
    bsn + "-" + version.getMajor() + "." + version.getMinor() + "." + version.getMicro() + ".jar");
  return file;
}

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bnd

private static int compare(Version v1, Version v2) {
  if (v1.getMajor() != v2.getMajor())
    return v1.getMajor() - v2.getMajor();
  if (v1.getMinor() != v2.getMinor())
    return v1.getMinor() - v2.getMinor();
  if (v1.getMicro() != v2.getMicro())
    return v1.getMicro() - v2.getMicro();
  return 0;
}

代码示例来源:origin: biz.aQute.bnd/biz.aQute.repository

private static int compare(Version v1, Version v2) {
  if (v1.getMajor() != v2.getMajor())
    return v1.getMajor() - v2.getMajor();
  if (v1.getMinor() != v2.getMinor())
    return v1.getMinor() - v2.getMinor();
  if (v1.getMicro() != v2.getMicro())
    return v1.getMicro() - v2.getMicro();
  return 0;
}

代码示例来源:origin: biz.aQute.bnd/bnd

private Version bumpBundle(Delta delta, Version last, int offset, int base) {
  switch (delta) {
    case MINOR :
      return new Version(last.getMajor(), last.getMinor() + offset, base);
    case MAJOR :
      return new Version(last.getMajor() + 1, base, base);
    case ADDED :
      return new Version(last.getMajor(), last.getMinor() + offset, base);
    default :
      return new Version(last.getMajor(), last.getMinor(), last.getMicro() + offset);
  }
}

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib

private Version bumpBundle(Delta delta, Version last, int offset, int base) {
  switch (delta) {
    case MINOR :
      return new Version(last.getMajor(), last.getMinor() + offset, base);
    case MAJOR :
      return new Version(last.getMajor() + offset, base, base);
    case ADDED :
      return new Version(last.getMajor(), last.getMinor() + offset, base);
    default :
      return new Version(last.getMajor(), last.getMinor(), last.getMicro() + offset);
  }
}

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib

public Version getVersion() {
  if (xversion != null)
    return new Version(xversion);
  String version = manifest.getMainAttributes()
    .getValue(Constants.BUNDLE_VERSION);
  Version v = new Version(version);
  return new Version(v.getMajor(), v.getMinor(), v.getMicro());
}

代码示例来源:origin: biz.aQute.bnd/bndlib

public Version getVersion() {
  if (xversion != null)
    return new Version(xversion);
  String version = manifest.getMainAttributes().getValue(Constants.BUNDLE_VERSION);
  Version v = new Version(version);
  return new Version(v.getMajor(), v.getMinor(), v.getMicro());
}

代码示例来源:origin: biz.aQute/bndlib

public Version getVersion() {
  if (xversion != null)
    return new Version(xversion);
  String version = manifest.getMainAttributes().getValue(Constants.BUNDLE_VERSION);
  Version v = new Version(version);
  return new Version(v.getMajor(), v.getMinor(), v.getMicro());
}

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bnd

public Version getVersion() {
  if (xversion != null)
    return new Version(xversion);
  String version = manifest.getMainAttributes()
    .getValue(Constants.BUNDLE_VERSION);
  Version v = new Version(version);
  return new Version(v.getMajor(), v.getMinor(), v.getMicro());
}

代码示例来源:origin: biz.aQute.bnd/bndlib

private Version bumpBundle(Delta delta, Version last, int offset, int base) {
  switch (delta) {
    case MINOR :
      return new Version(last.getMajor(), last.getMinor() + offset, base);
    case MAJOR :
      return new Version(last.getMajor() + 1, base, base);
    case ADDED :
      return new Version(last.getMajor(), last.getMinor() + offset, base);
    default :
      return new Version(last.getMajor(), last.getMinor(), last.getMicro() + offset);
  }
}

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bnd

private Version bumpBundle(Delta delta, Version last, int offset, int base) {
  switch (delta) {
    case MINOR :
      return new Version(last.getMajor(), last.getMinor() + offset, base);
    case MAJOR :
      return new Version(last.getMajor() + offset, base, base);
    case ADDED :
      return new Version(last.getMajor(), last.getMinor() + offset, base);
    default :
      return new Version(last.getMajor(), last.getMinor(), last.getMicro() + offset);
  }
}

代码示例来源:origin: biz.aQute.bnd/bnd

public Version getVersion() {
  if (xversion != null)
    return new Version(xversion);
  String version = manifest.getMainAttributes().getValue(Constants.BUNDLE_VERSION);
  Version v = new Version(version);
  return new Version(v.getMajor(), v.getMinor(), v.getMicro());
}

代码示例来源:origin: biz.aQute/bndlib

private Version bumpBundle(Delta delta, Version last, int offset, int base) {
    switch (delta) {
      case MINOR :
        return new Version(last.getMajor(), last.getMinor() + offset, base);
      case MAJOR :
        return new Version(last.getMajor() + 1, base, base);
      case ADDED :
        return new Version(last.getMajor(), last.getMinor() + offset, base);
      default :
        return new Version(last.getMajor(), last.getMinor(), last.getMicro() + offset);
    }
  }
}

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib

private Version bump(Delta delta, Version last, int offset, int base) {
  switch (delta) {
    case UNCHANGED :
      return last;
    case MINOR :
      return new Version(last.getMajor(), last.getMinor() + offset, base);
    case MAJOR :
      return new Version(last.getMajor() + 1, base, base);
    case ADDED :
      return last;
    default :
      return new Version(last.getMajor(), last.getMinor(), last.getMicro() + offset);
  }
}

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib

public MavenVersion toSnapshot() {
  Version newv = new Version(version.getMajor(), version.getMinor(), version.getMicro(), SNAPSHOT);
  return new MavenVersion(newv);
}

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bnd

public MavenVersion toSnapshot() {
  Version newv = new Version(version.getMajor(), version.getMinor(), version.getMicro(), SNAPSHOT);
  return new MavenVersion(newv);
}

相关文章