Module ClassPath

module ClassPath: sig .. end
Abstraction over class path elements.

type error = 
| Unable_to_open_archive of string
| Does_not_exist of string
| Class_not_found of string
exception Exception of error
val string_of_error : error -> string
type t 
The type of class paths.
val default_separator : string
Default separator between classpath elements. Loaded from the BARISTA_CLASSPATH_SEPARATOR environment variable if set, heuristically determined otherwise.
val make_of_string : ?separator:string -> string -> t
Constructs a class path from a string, using the passed separator between class path elements (defaulting to default_separator). Raises Exception if a class path element does not exists or if an archive cannot be opened.
val make_of_list : string list -> t
Constructs a class path from the passed elements. Raises Exception if a class path element does not exists or if an archive cannot be opened.
val make : unit -> t
Constructs a class path from the "CLASSPATH" environment variable, defaulting to "." if the variable is not set. Does not raise an exception if a class path element does not exists or if an archive cannot be opened.
val to_text : t -> string
Converts the passed class path into its textual representation.
val append : ?separator:string -> string -> t -> t
append p cp returns a class path that is cp plus p added at its end. The separator parameter defaults to default_separator.
val prepend : ?separator:string -> string -> t -> t
prepend p cp returns a class path that is cp plus p added at its begin. The separator parameter defaults to default_separator.
val open_stream : t -> string -> InputStream.t
open_stream cp cn returns the stream for class whose fully qualified name is cn, search class path cp. Raises Exception if the passed class is not found in the given class path.
val close : t -> unit
Closes all underlying archives, subsequent tries to read from such archives will hence fail. Silently fails if an archive fails to close.
val equal : t -> t -> bool
Equality over class paths.
val compare : t -> t -> int
Comparison over class paths.
val hash : t -> int
Hash function over class paths.
val to_string : t -> string
Converts the passed class path into a string.