public class ClasspathSourceLocation extends java.lang.Object implements SourceLocation
ClasspathLibraryInfo and use this class
for the source location.This class has no state; any classes it's asked about, it assumes it can find the corresponding .java file somewhere on the classpath using the class's ClassLoader.
ClasspathLibraryInfo| Constructor and Description |
|---|
ClasspathSourceLocation() |
| 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 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.