Package com.github.javaparser.utils
Class ProjectRoot
- java.lang.Object
-
- com.github.javaparser.utils.ProjectRoot
-
public class ProjectRoot extends java.lang.ObjectThe structure of a Java project directory. It was originally created specifically to quickly configure the symbol solver. You can use it as a general container for project information.A project has a root directory, and it has zero or more directories that contain source code.
To create a ProjectRoot use a CollectionStrategy, or instantiate ProjectRoot yourself.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<java.nio.file.Path,SourceRoot>cacheprivate ParserConfigurationparserConfigurationprivate java.nio.file.Pathroot
-
Constructor Summary
Constructors Constructor Description ProjectRoot(java.nio.file.Path root)ProjectRoot(java.nio.file.Path root, ParserConfiguration parserConfiguration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddSourceRoot(java.nio.file.Path path)java.nio.file.PathgetRoot()java.util.Optional<SourceRoot>getSourceRoot(java.nio.file.Path sourceRoot)java.util.List<SourceRoot>getSourceRoots()java.lang.StringtoString()
-
-
-
Field Detail
-
root
private final java.nio.file.Path root
-
cache
private final java.util.Map<java.nio.file.Path,SourceRoot> cache
-
parserConfiguration
private final ParserConfiguration parserConfiguration
-
-
Constructor Detail
-
ProjectRoot
public ProjectRoot(java.nio.file.Path root)
-
ProjectRoot
public ProjectRoot(java.nio.file.Path root, ParserConfiguration parserConfiguration)
-
-
Method Detail
-
getSourceRoot
public java.util.Optional<SourceRoot> getSourceRoot(java.nio.file.Path sourceRoot)
-
getSourceRoots
public java.util.List<SourceRoot> getSourceRoots()
-
addSourceRoot
public void addSourceRoot(java.nio.file.Path path)
-
getRoot
public java.nio.file.Path getRoot()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-