Package org.eclipse.jdt.launching
Class LibraryLocation
- java.lang.Object
-
- org.eclipse.jdt.launching.LibraryLocation
-
public final class LibraryLocation extends Object
The location of a library (for example rt.jar).Clients may instantiate this class.
-
-
Constructor Summary
Constructors Constructor Description LibraryLocation(IPath libraryPath, IPath sourcePath, IPath packageRoot)Creates a new library location.LibraryLocation(IPath libraryPath, IPath sourcePath, IPath packageRoot, URL javadocLocation)Creates a new library location.LibraryLocation(IPath libraryPath, IPath sourcePath, IPath packageRoot, URL javadocLocation, URL indexLocation)Creates a new library location.LibraryLocation(IPath libraryPath, IPath sourcePath, IPath packageRoot, URL javadocLocation, URL indexLocation, IPath externalAnnotations)Creates a new library location.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)protected booleanequals(IPath path1, IPath path2)Returns whether the given paths are equal - either may benull.IPathgetExternalAnnotationsPath()Return the JRE library external annotations location.URLgetIndexLocation()Returns the index location associated with this library location.URLgetJavadocLocation()Returns the Javadoc location associated with this Library location.IPathgetPackageRootPath()Returns the path to the default package in the sources zip fileIPathgetSystemLibraryPath()Returns the JRE library jar location.IPathgetSystemLibrarySourcePath()Returns the JRE library source zip location.inthashCode()voidsetIndexLocation(URL indexLoc)Sets the index location to the givenURL.voidsetSystemLibrarySource(IPath source)Sets the JRE library source zip location.
-
-
-
Constructor Detail
-
LibraryLocation
public LibraryLocation(IPath libraryPath, IPath sourcePath, IPath packageRoot)
Creates a new library location.- Parameters:
libraryPath- The location of the JAR containing java.lang.Object Must not benull.sourcePath- The location of the zip file containing the sources forlibraryMust not benull(Use Path.EMPTY instead)packageRoot- The path inside thesourcezip file where packages names begin. If the source for java.lang.Object source is found at "src/java/lang/Object.java" in the zip file, the packageRoot should be "src" Must not benull. (Use Path.EMPTY or IPath.ROOT)- Throws:
IllegalArgumentException- If the library path isnull.
-
LibraryLocation
public LibraryLocation(IPath libraryPath, IPath sourcePath, IPath packageRoot, URL javadocLocation)
Creates a new library location.- Parameters:
libraryPath- The location of the JAR containing java.lang.Object Must not benull.sourcePath- The location of the zip file containing the sources forlibraryMust not benull(Use Path.EMPTY instead)packageRoot- The path inside thesourcezip file where packages names begin. If the source for java.lang.Object source is found at "src/java/lang/Object.java" in the zip file, the packageRoot should be "src" Must not benull. (Use Path.EMPTY or IPath.ROOT)javadocLocation- The location of the javadoc forlibrary- Throws:
IllegalArgumentException- If the library path isnull.- Since:
- 3.1
-
LibraryLocation
public LibraryLocation(IPath libraryPath, IPath sourcePath, IPath packageRoot, URL javadocLocation, URL indexLocation)
Creates a new library location.- Parameters:
libraryPath- The location of the JAR containing java.lang.Object Must not benull.sourcePath- The location of the zip file containing the sources forlibraryMust not benull(Use Path.EMPTY instead)packageRoot- The path inside thesourcezip file where packages names begin. If the source for java.lang.Object source is found at "src/java/lang/Object.java" in the zip file, the packageRoot should be "src" Must not benull. (Use Path.EMPTY or IPath.ROOT)javadocLocation- The location of the javadoc forlibraryindexLocation- The location of the index forlibrary- Throws:
IllegalArgumentException- If the library path isnull.- Since:
- 3.7
-
LibraryLocation
public LibraryLocation(IPath libraryPath, IPath sourcePath, IPath packageRoot, URL javadocLocation, URL indexLocation, IPath externalAnnotations)
Creates a new library location.- Parameters:
libraryPath- The location of the JAR containing java.lang.Object Must not benull.sourcePath- The location of the zip file containing the sources forlibraryMust not benull(Use Path.EMPTY instead)packageRoot- The path inside thesourcezip file where packages names begin. If the source for java.lang.Object source is found at "src/java/lang/Object.java" in the zip file, the packageRoot should be "src" Must not benull. (Use Path.EMPTY or IPath.ROOT)javadocLocation- The location of the javadoc forlibraryindexLocation- The location of the index forlibraryexternalAnnotations- The file or directory containing external annotations, ornullif not applicable.- Throws:
IllegalArgumentException- If the library path isnull.- Since:
- 3.8
-
-
Method Detail
-
getSystemLibraryPath
public IPath getSystemLibraryPath()
Returns the JRE library jar location.- Returns:
- The JRE library jar location.
-
getSystemLibrarySourcePath
public IPath getSystemLibrarySourcePath()
Returns the JRE library source zip location.- Returns:
- The JRE library source zip location.
-
getExternalAnnotationsPath
public IPath getExternalAnnotationsPath()
Return the JRE library external annotations location.- Returns:
- The file or directory holding external annotations, or Path.EMPTY if not applicable. This will never be null.
- Since:
- 3.8
-
getPackageRootPath
public IPath getPackageRootPath()
Returns the path to the default package in the sources zip file- Returns:
- The path to the default package in the sources zip file.
-
getJavadocLocation
public URL getJavadocLocation()
Returns the Javadoc location associated with this Library location.- Returns:
- a
URLpointing to the Javadoc location associated with this Library location, ornullif none - Since:
- 3.1
-
getIndexLocation
public URL getIndexLocation()
Returns the index location associated with this library location.- Returns:
- a
URLpointing to the index location associated with this Library location, ornullif none - Since:
- 3.7
-
equals
protected boolean equals(IPath path1, IPath path2)
Returns whether the given paths are equal - either may benull.- Parameters:
path1- path to be comparedpath2- path to be compared- Returns:
- whether the given paths are equal
-
setSystemLibrarySource
public void setSystemLibrarySource(IPath source)
Sets the JRE library source zip location.- Parameters:
source- the source to set- Since:
- 3.4
-
-