Package xyz.janboerman.scalaloader
Class ScalaRelease
java.lang.Object
xyz.janboerman.scalaloader.ScalaRelease
- All Implemented Interfaces:
Comparable<ScalaRelease>
This class represents a compatibility release version of Scala.
Some constants for commonly used versions of Scala are provided.
- Implementation Note:
- this class should not be converted into an enum because we want to support the use case of plugin authors to use unsupported and experimental versions of Scala.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ScalaRelease
The Scala 2.12.x seriesstatic final ScalaRelease
The Scala 2.13.x seriesstatic final ScalaRelease
The Scala 3.0.x seriesstatic final ScalaRelease
The Scala 3.1.x seriesstatic final ScalaRelease
The Scala 3.2.x seriesstatic final ScalaRelease
The Scala 3.3.x seriesstatic final ScalaRelease
The Scala 3.4.x seriesstatic final ScalaRelease
The Scala 3.5.x seriesstatic final Comparator
<String> This comparator compares two version strings that are following the epoch.major.minor version scheme. -
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(ScalaRelease that) boolean
static ScalaRelease
fromScalaVersion
(String scalaVersion) Get the ScalaRelease from a Scala version string.Get the compatibility version of Scala.int
hashCode()
boolean
isScala2()
boolean
isScala3()
toString()
-
Field Details
-
VERSION_COMPARATOR
This comparator compares two version strings that are following the epoch.major.minor version scheme. -
SCALA_2_12
The Scala 2.12.x series -
SCALA_2_13
The Scala 2.13.x series -
SCALA_3_0
The Scala 3.0.x series -
SCALA_3_1
The Scala 3.1.x series -
SCALA_3_2
The Scala 3.2.x series -
SCALA_3_3
The Scala 3.3.x series -
SCALA_3_4
The Scala 3.4.x series -
SCALA_3_5
The Scala 3.5.x series
-
-
Method Details
-
fromScalaVersion
Get the ScalaRelease from a Scala version string.
The Scala version sting is expected to have the compatibility-release as its prefix.
- Parameters:
scalaVersion
- the scala version string- Returns:
- the ScalaRelease
-
isScala2
public boolean isScala2() -
isScala3
public boolean isScala3() -
getCompatVersion
Get the compatibility version of Scala.
For example, the compatibility version of Scala 2.13.5 would be "2.13".
- Returns:
- the compatibility version
-
toString
-
equals
-
hashCode
public int hashCode() -
compareTo
- Specified by:
compareTo
in interfaceComparable<ScalaRelease>
-