public class JavadocAndSourceRootDetection extends Object
Modifier and Type | Method and Description |
---|---|
static FileObject |
findJavadocRoot(FileObject baseFolder)
Finds Javadoc root inside of given folder.
|
static Set<? extends FileObject> |
findJavadocRoots(FileObject baseFolder,
AtomicBoolean canceled)
Finds all javadoc roots under the given base folder.
|
static FileObject |
findPackageRoot(FileObject fo)
Returns package root of the given java or class file.
|
static FileObject |
findSourceRoot(FileObject fo)
Finds Java sources root inside of given folder.
|
static Set<? extends FileObject> |
findSourceRoots(FileObject folder,
AtomicBoolean canceled)
Finds Java sources roots inside of given folder.
|
public static FileObject findJavadocRoot(FileObject baseFolder)
baseFolder
- base folder to start search in; routine will traverse 5 folders
deep before giving up; cannot be null; must be folder@NonNull public static Set<? extends FileObject> findJavadocRoots(@NonNull FileObject baseFolder, @NullAllowed AtomicBoolean canceled)
baseFolder
- the base folder to start search in; routine will traverse 5 folderscanceled
- the canceling supportpublic static FileObject findSourceRoot(FileObject fo)
fo
- base folder to start search in; routine will traverse subfolders
to find a Java file to detect package root; cannot be null; must be folderpublic static Set<? extends FileObject> findSourceRoots(@NonNull FileObject folder, @NullAllowed AtomicBoolean canceled)
folder
- to start search in; routine will traverse subfolders
to find a Java file to detect package root; cannot be null; must be foldercanceled
- if set to true the method immediately returns roots it has already found,
may be nullCollection
of found package rootspublic static FileObject findPackageRoot(FileObject fo)
fo
- either .java or .class file; never null