Class DirSourceLocation
java.lang.Object
org.fife.rsta.ac.java.buildpath.DirSourceLocation
- All Implemented Interfaces:
SourceLocation
Represents Java source in a directory, such as in a project's source folder.
- Version:
- 1.0
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDirSourceLocation(File dir) Constructor.DirSourceLocation(String dir) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionReturns an AST for the specified class file.Returns a string representation of this source location.
-
Field Details
-
dir
-
-
Constructor Details
-
DirSourceLocation
Constructor.- Parameters:
dir- The directory containing the source files.
-
DirSourceLocation
Constructor.- Parameters:
dir- The directory containing the source files.
-
-
Method Details
-
getCompilationUnit
Returns an AST for the specified class file.- Specified by:
getCompilationUnitin interfaceSourceLocation- 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
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.- Specified by:
getLocationAsStringin interfaceSourceLocation- Returns:
- The location of this source as a string, or
nullif it is not an accessible location.
-