ClassInJar

sbt.internal.inc.JarUtils.ClassInJar
See theClassInJar companion class
object ClassInJar

Attributes

Companion
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
ClassInJar.type

Members list

Value members

Concrete methods

def apply(jar: Path, cls: ClassFilePath): ClassInJar

The base constructor for ClassInJar

The base constructor for ClassInJar

Value parameters

cls

the relative path to class within the jar

jar

the jar file

Attributes

Returns

a proper ClassInJar identified by given jar and path to class

def fromFile(f: File): ClassInJar

Initialized ClassInJar based on its serialized value stored inside a file

Initialized ClassInJar based on its serialized value stored inside a file

Attributes

def fromPath(p: Path): ClassInJar
def fromURL(url: URL, jar: Path): ClassInJar

Converts an URL to a class in a jar to ClassInJar. The method is rather trivial as it also takes precomputed path to the jar that it logically should extract itself. However as it is computed at the callsite anyway, to avoid recomputation it is passed as a parameter/

Converts an URL to a class in a jar to ClassInJar. The method is rather trivial as it also takes precomputed path to the jar that it logically should extract itself. However as it is computed at the callsite anyway, to avoid recomputation it is passed as a parameter/

As an example, given a URL: "jar:file:///C:/develop/zinc/target/output.jar!/sbt/internal/inc/Compile.class" and a file: "C:\develop\zinc\target\output.jar" it will create a ClassInJar represented as: "C:\develop\zinc\target\output.jar!sbt\internal\inc\Compile.class"

Value parameters

jar

a jar file where the class is located in

url

url to a class inside a jar

Attributes

Returns

the class inside a jar represented as ClassInJar