-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #47 from eed3si9n/topic/library-loader
Layered class loading of library and compiler
- Loading branch information
Showing
5 changed files
with
51 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
launcher-implementation/src/main/scala/xsbt/boot/LibraryClassLoader.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package xsbt.boot | ||
|
||
import java.net.{ URL, URLClassLoader } | ||
|
||
final class LibraryClassLoader(urls: Array[URL], parent: ClassLoader, | ||
val scalaVersion: String) extends URLClassLoader(urls, parent) with xsbti.LibraryClassLoader { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
launcher-interface/src/main/java/xsbti/ExtendedScalaProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package xsbti; | ||
|
||
public interface ExtendedScalaProvider extends ScalaProvider | ||
{ | ||
/** A ClassLoader that loads the classes from scala-library.jar. It will be the parent of `loader` .*/ | ||
public ClassLoader loaderLibraryOnly(); | ||
} |
11 changes: 11 additions & 0 deletions
11
launcher-interface/src/main/java/xsbti/LibraryClassLoader.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package xsbti; | ||
|
||
import java.io.File; | ||
|
||
/** | ||
* Marker interface for classloader with just scala-library. | ||
*/ | ||
public interface LibraryClassLoader | ||
{ | ||
public String scalaVersion(); | ||
} |