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 Details

    • getCompilationUnit

      CompilationUnit getCompilationUnit(ClassFile cf) throws IOException
      Returns an AST for the specified class file.
      Parameters:
      cf - The class file to grab the AST for.
      Returns:
      The AST, or null if 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 null if it is not an accessible location.