public class ZipSourceLocation extends java.lang.Object implements SourceLocation
src/" subfolder, or at the root level of the archive. This
class is useful for the JDK or other libraries that come with a
src.zip file (src.jar on OS X).| Constructor and Description |
|---|
ZipSourceLocation(java.io.File archive)
Constructor.
|
ZipSourceLocation(java.lang.String archive)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
CompilationUnit |
getCompilationUnit(ClassFile cf)
Returns an AST for the specified class file.
|
java.lang.String |
getLocationAsString()
Returns a string representation of this source location.
|
public ZipSourceLocation(java.lang.String archive)
archive - The archive containing the source. This should be an
absolute path to ensure correctness.public ZipSourceLocation(java.io.File archive)
archive - The archive containing the source.public CompilationUnit getCompilationUnit(ClassFile cf) throws java.io.IOException
getCompilationUnit in interface SourceLocationcf - The class file to grab the AST for.null if it cannot be found.java.io.IOException - If an IO error occurs.public java.lang.String getLocationAsString()
getLocationAsString in interface SourceLocationnull if
it is not an accessible location.