ScalaInstance

final class ScalaInstance(val version: String, val loader: ClassLoader, val loaderCompilerOnly: ClassLoader, val loaderLibraryOnly: ClassLoader, val libraryJars: Array[File], val compilerJars: Array[File], val allJars: Array[File], val explicitActual: Option[String]) extends ScalaInstance

A Scala instance encapsulates all the information that is bound to a concrete Scala version, like the java.lang.ClassLoader or all the JARs required for Scala compilation: library jar, compiler jar and others.

Both a ClassLoader and the jars are required because the compiler's boot classpath requires the location of the library and compiler jar on the classpath to compile any Scala program and macros.

See also:

xsbti.compile.ScalaInstance

Companion:
object
trait ScalaInstance
class Object
trait Matchable
class Any

Value members

Deprecated constructors

@deprecated("Use constructor with loaderCompilerOnly", "1.5.0")
def this(version: String, loader: ClassLoader, loaderLibraryOnly: ClassLoader, libraryJar: File, compilerJar: File, allJars: Array[File], explicitActual: Option[String])
Deprecated
@deprecated("Use constructor with loaderCompilerOnly", "1.5.0")
def this(version: String, loader: ClassLoader, loaderLibraryOnly: ClassLoader, libraryJars: Array[File], compilerJar: File, allJars: Array[File], explicitActual: Option[String])
Deprecated
@deprecated("Use constructor with loaderLibraryOnly and compilerLibraryOnly", "1.1.2")
def this(version: String, loader: ClassLoader, libraryJar: File, compilerJar: File, allJars: Array[File], explicitActual: Option[String])
Deprecated

Concrete methods

def isManagedVersion: Boolean

Check whether scalaInstance comes from a managed (i.e. ivy-resolved) scala or if it's a free-floating ScalaInstance, in which case we need to do tricks in the classpaths because it won't be on them.

Check whether scalaInstance comes from a managed (i.e. ivy-resolved) scala or if it's a free-floating ScalaInstance, in which case we need to do tricks in the classpaths because it won't be on them.

def otherJars: Array[File]
override def toString: String
Definition Classes
Any

Deprecated and Inherited methods

@Deprecated @deprecated("see corresponding Javadoc for more information.", "")
def compilerJar(): File
Deprecated
Inherited from:
ScalaInstance
@Deprecated @deprecated("see corresponding Javadoc for more information.", "")
def libraryJar(): File
Deprecated
Inherited from:
ScalaInstance

Concrete fields

lazy val actualVersion: String

Get version of Scala in the compiler.properties file from the loader. This version may be different than the one passed in by version.

Get version of Scala in the compiler.properties file from the loader. This version may be different than the one passed in by version.

val allJars: Array[File]
val compilerJars: Array[File]
val explicitActual: Option[String]
val libraryJars: Array[File]
val loader: ClassLoader
val loaderCompilerOnly: ClassLoader
val loaderLibraryOnly: ClassLoader
val version: String