public class SourceStructure extends Object
| Constructor and Description |
|---|
SourceStructure(Path rootDirectory,
Language language) |
| Modifier and Type | Method and Description |
|---|---|
Path |
createResourceFile(String packageName,
String file)
Create a resource file, creating its package structure if necessary.
|
Path |
createSourceFile(String packageName,
String fileName)
Create a source file, creating its package structure if necessary.
|
Path |
getResourcesDirectory()
Return the resources
directory of this structure. |
Path |
getRootDirectory()
Return the root
directory of this structure. |
Path |
getSourcesDirectory()
Return the sources
directory of this structure. |
Path |
resolveResourceFile(String packageName,
String file)
Resolve a resource file defined in the specified package.
|
Path |
resolveSourceFile(String packageName,
String fileName)
Resolve a source file.
|
public Path getRootDirectory()
directory of this structure. Can be used to access
additional resources.public Path getSourcesDirectory()
directory of this structure.public Path getResourcesDirectory()
directory of this structure.public Path resolveSourceFile(String packageName, String fileName)
packageName - the name of the packagefileName - the name of the file (without its extension)file to use to store a CompilationUnit with the
specified package and namegetSourcesDirectory()public Path createSourceFile(String packageName, String fileName) throws IOException
packageName - the name of the packagefileName - the name of the file (without its extension)file to use to store a CompilationUnit with the
specified package and nameIOException - if an error occurred while trying to create the directory
structure or the file itselfgetSourcesDirectory()public Path resolveResourceFile(String packageName, String file)
packageName - the name of the packagefile - the name of the file (including its extension)file to use to store a resource with the specified packagegetResourcesDirectory()public Path createResourceFile(String packageName, String file) throws IOException
packageName - the name of the packagefile - the name of the file (including its extension)file to use to store a resource with the specified packageIOException - if an error occurred while trying to create the directory
structure or the file itselfgetResourcesDirectory()Copyright © 2022 Pivotal Software, Inc.. All rights reserved.