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

public Class ParserCollectionStrategy

extends Object
implements CollectionStrategy
Class Inheritance
All Implemented Interfaces
com.github.javaparser.utils.CollectionStrategy
Imports
com.github.javaparser.ParserConfiguration, java.io.IOException, java.nio.file.*, java.nio.file.attribute.BasicFileAttributes

A brute force CollectionStrategy 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.

Field Summary

Modifier and TypeField and Description
private final ParserConfiguration

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public ProjectRoot
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

parserConfigurationback to summary
private final ParserConfiguration parserConfiguration

Constructor Detail

ParserCollectionStrategyback to summary
public ParserCollectionStrategy()
ParserCollectionStrategyback to summary
public ParserCollectionStrategy(ParserConfiguration parserConfiguration)

Method Detail

collectback to summary
public ProjectRoot collect(Path path)

Implements com.github.javaparser.utils.CollectionStrategy.collect.

Annotations
@Override