From e07dc32b7e6008b1aa437441586c3f05c1eac4e8 Mon Sep 17 00:00:00 2001 From: Josh Suereth Date: Tue, 4 Dec 2012 11:15:23 -0500 Subject: [PATCH] Adding some documentation to Launcher interface. * Documented most of the heavily used methods in Launcher. * Need to decide whether or not getScala is 'deprecated' or just disuaded in the future. --- .../src/main/java/xsbti/Launcher.java | 43 +++++++++++++++++-- 1 file changed, 40 insertions(+), 3 deletions(-) diff --git a/launch/interface/src/main/java/xsbti/Launcher.java b/launch/interface/src/main/java/xsbti/Launcher.java index 8f83f1971..30f30e3ef 100644 --- a/launch/interface/src/main/java/xsbti/Launcher.java +++ b/launch/interface/src/main/java/xsbti/Launcher.java @@ -8,15 +8,52 @@ public interface Launcher public ScalaProvider getScala(String version); public ScalaProvider getScala(String version, String reason); public ScalaProvider getScala(String version, String reason, String scalaOrg); + /** + * returns an `AppProvider` which is able to resolve an application + * and instantiate its `xsbti.Main` in a new classloader. + * See [AppProvider] for more details. + * @param id The artifact coordinates of the application. + * @param version The version to resolve + */ public AppProvider app(ApplicationID id, String version); + /** + * This returns the "top" classloader for a launched application. This classlaoder + * lives somewhere *above* that used for the application. This classloader + * is used for doing any sort of JNA/native library loads so that downstream + * loaders can share native libraries rather than run into "load-once" restrictions. + */ public ClassLoader topLoader(); + /** + * Return the global lock for interacting with the file system. + * + * A mechanism to do file-based locking correctly on the JVM. See + * the [[GlobalLock]] class for more details. + */ public GlobalLock globalLock(); + /** Value of the `sbt.boot.dir` property, or the default + * boot configuration defined in `boot.directory`. + */ public File bootDirectory(); - /** Configured launcher repositories. */ + /** Configured launcher repositories. These repositories + * are the same ones used to load the launcher. + */ public xsbti.Repository[] ivyRepositories(); - /** The user has configured the launcher with the only repositories it wants to use for this applciation. */ + /** The user has configured the launcher with the only repositories + * it wants to use for this applciation. + */ public boolean isOverrideRepositories(); - // null if none set + /** + * The value of `ivy.ivy-home` of the boot properties file. + * This defaults to the `sbt.ivy.home` property, or `~/.ivy2`. + * Use this setting in an application when using Ivy to resolve + * more artifacts. + * + * @returns a file, or null if not set. + */ public File ivyHome(); + /** An array of the checksums that should be checked when retreiving artifacts. + * Configured via the the `ivy.checksums` section of the boot configuration. + * Defaults to sha1, md5 or the value of the `sbt.checksums` property. + */ public String[] checksums(); }