Package org.eclipse.jdt.launching
Class LibraryLocation
java.lang.Object
org.eclipse.jdt.launching.LibraryLocation
The location of a library (for example rt.jar).
Clients may instantiate this class.
-
Constructor Summary
ConstructorDescriptionLibraryLocation
(org.eclipse.core.runtime.IPath libraryPath, org.eclipse.core.runtime.IPath sourcePath, org.eclipse.core.runtime.IPath packageRoot) Creates a new library location.LibraryLocation
(org.eclipse.core.runtime.IPath libraryPath, org.eclipse.core.runtime.IPath sourcePath, org.eclipse.core.runtime.IPath packageRoot, URL javadocLocation) Creates a new library location.LibraryLocation
(org.eclipse.core.runtime.IPath libraryPath, org.eclipse.core.runtime.IPath sourcePath, org.eclipse.core.runtime.IPath packageRoot, URL javadocLocation, URL indexLocation) Creates a new library location.LibraryLocation
(org.eclipse.core.runtime.IPath libraryPath, org.eclipse.core.runtime.IPath sourcePath, org.eclipse.core.runtime.IPath packageRoot, URL javadocLocation, URL indexLocation, org.eclipse.core.runtime.IPath externalAnnotations) Creates a new library location. -
Method Summary
Modifier and TypeMethodDescriptionboolean
protected boolean
equals
(org.eclipse.core.runtime.IPath path1, org.eclipse.core.runtime.IPath path2) Returns whether the given paths are equal - either may benull
.org.eclipse.core.runtime.IPath
Return the JRE library external annotations location.Returns the index location associated with this library location.Returns the Javadoc location associated with this Library location.org.eclipse.core.runtime.IPath
Returns the path to the default package in the sources zip fileorg.eclipse.core.runtime.IPath
Returns the JRE library jar location.org.eclipse.core.runtime.IPath
Returns the JRE library source zip location.int
hashCode()
void
setIndexLocation
(URL indexLoc) Sets the index location to the givenURL
.void
setSystemLibrarySource
(org.eclipse.core.runtime.IPath source) Sets the JRE library source zip location.
-
Constructor Details
-
LibraryLocation
public LibraryLocation(org.eclipse.core.runtime.IPath libraryPath, org.eclipse.core.runtime.IPath sourcePath, org.eclipse.core.runtime.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 forlibrary
Must not benull
(Use Path.EMPTY instead)packageRoot
- The path inside thesource
zip 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(org.eclipse.core.runtime.IPath libraryPath, org.eclipse.core.runtime.IPath sourcePath, org.eclipse.core.runtime.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 forlibrary
Must not benull
(Use Path.EMPTY instead)packageRoot
- The path inside thesource
zip 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(org.eclipse.core.runtime.IPath libraryPath, org.eclipse.core.runtime.IPath sourcePath, org.eclipse.core.runtime.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 forlibrary
Must not benull
(Use Path.EMPTY instead)packageRoot
- The path inside thesource
zip 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
indexLocation
- The location of the index forlibrary
- Throws:
IllegalArgumentException
- If the library path isnull
.- Since:
- 3.7
-
LibraryLocation
public LibraryLocation(org.eclipse.core.runtime.IPath libraryPath, org.eclipse.core.runtime.IPath sourcePath, org.eclipse.core.runtime.IPath packageRoot, URL javadocLocation, URL indexLocation, org.eclipse.core.runtime.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 forlibrary
Must not benull
(Use Path.EMPTY instead)packageRoot
- The path inside thesource
zip 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
indexLocation
- The location of the index forlibrary
externalAnnotations
- The file or directory containing external annotations, ornull
if not applicable.- Throws:
IllegalArgumentException
- If the library path isnull
.- Since:
- 3.8
-
-
Method Details
-
getSystemLibraryPath
public org.eclipse.core.runtime.IPath getSystemLibraryPath()Returns the JRE library jar location.- Returns:
- The JRE library jar location.
-
getSystemLibrarySourcePath
public org.eclipse.core.runtime.IPath getSystemLibrarySourcePath()Returns the JRE library source zip location.- Returns:
- The JRE library source zip location.
-
getExternalAnnotationsPath
public org.eclipse.core.runtime.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 org.eclipse.core.runtime.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
Returns the Javadoc location associated with this Library location.- Returns:
- a
URL
pointing to the Javadoc location associated with this Library location, ornull
if none - Since:
- 3.1
-
getIndexLocation
Returns the index location associated with this library location.- Returns:
- a
URL
pointing to the index location associated with this Library location, ornull
if none - Since:
- 3.7
-
equals
-
hashCode
public int hashCode() -
equals
protected boolean equals(org.eclipse.core.runtime.IPath path1, org.eclipse.core.runtime.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(org.eclipse.core.runtime.IPath source) Sets the JRE library source zip location.- Parameters:
source
- the source to set- Since:
- 3.4
-
setIndexLocation
Sets the index location to the givenURL
.- Since:
- 3.7
-