Package com.github.javaparser.utils
Class ParserCollectionStrategy
- java.lang.Object
-
- com.github.javaparser.utils.ParserCollectionStrategy
-
- All Implemented Interfaces:
CollectionStrategy
public class ParserCollectionStrategy extends Object implements CollectionStrategy
A brute forceCollectionStrategy
for discovering a project structure. It will search through the given project root path for Java files, look at their package declarations, and figure out the root directories for those files. No project definition files like pom.xml or build.gradle are used. This strategy is crude, but can work for many cases. Note that any build artifacts will also be detected: jar files in target directories and so on.
-
-
Constructor Summary
Constructors Constructor Description ParserCollectionStrategy()
ParserCollectionStrategy(ParserConfiguration parserConfiguration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ProjectRoot
collect(Path path)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.github.javaparser.utils.CollectionStrategy
getPathMatcher, getRoot
-
-
-
-
Constructor Detail
-
ParserCollectionStrategy
public ParserCollectionStrategy()
-
ParserCollectionStrategy
public ParserCollectionStrategy(ParserConfiguration parserConfiguration)
-
-
Method Detail
-
collect
public ProjectRoot collect(Path path)
- Specified by:
collect
in interfaceCollectionStrategy
-
-