Interface SourceLocation
- All Known Implementing Classes:
ClasspathSourceLocation, DirSourceLocation, ZipSourceLocation
public interface SourceLocation
Represents the location of Java source, either in a zip file (src.zip),
a flat file (source in a project's source folder), or in some other location.
- Version:
- 1.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionReturns an AST for the specified class file.Returns a string representation of this source location.
-
Method Details
-
getCompilationUnit
Returns an AST for the specified class file.- Parameters:
cf- The class file to grab the AST for.- Returns:
- The AST, or
nullif it cannot be found. - Throws:
IOException- If an IO error occurs.
-
getLocationAsString
String getLocationAsString()Returns a string representation of this source location. For locations on disk such as zip files or directories, this should be the full path to the resource.- Returns:
- The location of this source as a string, or
nullif it is not an accessible location.
-