Dotty Documentation

0.5.0-bin-SNAPSHOT

final class JrtClassPath
extends Object with ClassPath with NoSourcePaths

Implementation ClassPath based on the JDK 9 encapsulated runtime modules (JEP-220)

https://bugs.openjdk.java.net/browse/JDK-8066492 is the most up to date reference for the structure of the jrt:// filesystem.

The implementation assumes that no classes exist in the empty package.

[-] Constructors

JrtClassPath ( fs: FileSystem )

[-] Members

[+] type F = Path
[+] private val dir : Path
[+] private val fs : FileSystem
[+] private val packageToModuleBases : Map [ String, Seq [ Path ] ]
[+] def asClassPathStrings : Seq [ String ]
[+] def asURLs : Seq [ URL ]
[+] def classes ( inPackage: String ) : Seq [ ClassFileEntry ]
[+] def findClassFile ( className: String ) : Option [ AbstractFile ]

Returns the classfile for an external name, e.g., "java.lang.String". This method does not return source files.

This method is used by the classfile parser. When parsing a Java class, its own inner classes are entered with a ClassfileLoader that parses the classfile returned by this method. It is also used in the backend, by the inliner, to obtain the bytecode when inlining from the classpath. It's also used by scalap.

[+] override def hasPackage ( pkg: String ) : Boolean

Empty string represents root package

[+] override def list ( inPackage: String ) : ClassPathEntries

Returns packages and classes (source or classfile) that are members of inPackage (not recursively). The inPackage string is a full package name, e.g., "scala.collection".

This is the main method uses to find classes, see class PackageLoader. The rootMirror.rootLoader is created with inPackage = "".

[+] private def packageOf ( dottedClassName: String ) : String
[+] override def packages ( inPackage: String ) : Seq [ PackageEntry ]