Top Description Fields Constructors Methods
com.github.javaparser.utils

public Class ProjectRoot

extends Object
Class Inheritance
Imports
com.github.javaparser.ParserConfiguration, java.nio.file.Path, java.util.ArrayList, .List, .Map, .Optional, java.util.concurrent.ConcurrentHashMap

The 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

Modifier and TypeField and Description
private final Map<Path, SourceRoot>
private final ParserConfiguration
private final Path

Constructor Summary

AccessConstructor and Description
public
public
ProjectRoot(Path root, ParserConfiguration parserConfiguration)

Method Summary

Modifier and TypeMethod and Description
public void
public Path
public Optional<SourceRoot>
getSourceRoot(Path sourceRoot)

public List<SourceRoot>
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

cacheback to summary
private final Map<Path, SourceRoot> cache
parserConfigurationback to summary
private final ParserConfiguration parserConfiguration
rootback to summary
private final Path root

Constructor Detail

ProjectRootback to summary
public ProjectRoot(Path root)
ProjectRootback to summary
public ProjectRoot(Path root, ParserConfiguration parserConfiguration)

Method Detail

addSourceRootback to summary
public void addSourceRoot(Path path)
getRootback to summary
public Path getRoot()
getSourceRootback to summary
public Optional<SourceRoot> getSourceRoot(Path sourceRoot)
getSourceRootsback to summary
public List<SourceRoot> getSourceRoots()
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object

Annotations
@Override