public class ImportStatement
extends java.lang.Object
implements io.spine.logging.Logging
Constructor and Description |
---|
ImportStatement(java.lang.String text,
java.io.File originFile)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
importedFileExists()
Tells whether the imported file is present on a file system.
|
java.nio.file.Path |
importedFilePath()
Obtains the absolute path to the imported file.
|
io.spine.code.fs.FileReference |
path()
Obtains the file reference used in this import.
|
ImportStatement |
replacePath(java.lang.CharSequence newPath)
Obtains a new instance with the updated path in the import statement.
|
java.nio.file.Path |
sourceDirectory()
Obtains the path of the directory with the file containing this import.
|
public ImportStatement(java.lang.String text, java.io.File originFile)
text
- the line with an import statementoriginFile
- the name of the file the import belongs topublic io.spine.code.fs.FileReference path()
public ImportStatement replacePath(java.lang.CharSequence newPath)
public boolean importedFileExists()
public java.nio.file.Path importedFilePath()
public java.nio.file.Path sourceDirectory()