diff options
Diffstat (limited to 'bundle-plugin/src/main/scala/com/yahoo/container/plugin/classanalysis/ExportPackageAnnotation.scala')
-rw-r--r-- | bundle-plugin/src/main/scala/com/yahoo/container/plugin/classanalysis/ExportPackageAnnotation.scala | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/bundle-plugin/src/main/scala/com/yahoo/container/plugin/classanalysis/ExportPackageAnnotation.scala b/bundle-plugin/src/main/scala/com/yahoo/container/plugin/classanalysis/ExportPackageAnnotation.scala deleted file mode 100644 index f9dc459fcc7..00000000000 --- a/bundle-plugin/src/main/scala/com/yahoo/container/plugin/classanalysis/ExportPackageAnnotation.scala +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -package com.yahoo.container.plugin.classanalysis - -import com.yahoo.container.plugin.util.Strings - -/** - * @author tonytv - */ -case class ExportPackageAnnotation(major: Int, minor: Int, micro: Int, qualifier: String) { - requireNonNegative(major, "major") - requireNonNegative(minor, "minor") - requireNonNegative(micro, "micro") - require(qualifier.matches("""(\p{Alpha}|\p{Digit}|_|-)*"""), - exportPackageError("qualifier must follow the format (alpha|digit|'_'|'-')* but was '%s'.".format(qualifier))) - - - private def requireNonNegative(i: Int, fieldName: String) { - require(i >= 0, exportPackageError("%s must be non-negative but was %d.".format(fieldName, i))) - } - - private def exportPackageError(s: String) = "ExportPackage anntotation: " + s - - def osgiVersion : String = (List(major, minor, micro) ++ Strings.noneIfEmpty(qualifier)).mkString(".") -} |