public abstract class ModuleInsight
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected ProgressIndicatorWrapper |
myProgress |
Constructor and Description |
---|
ModuleInsight(ProgressIndicator progress,
java.util.Set<java.lang.String> existingModuleNames,
java.util.Set<java.lang.String> existingProjectLibraryNames) |
Modifier and Type | Method and Description |
---|---|
protected void |
addExportedPackages(java.io.File sourceRoot,
java.util.Set<java.lang.String> packages) |
protected void |
addModules(java.util.Collection<? extends ModuleDescriptor> newModules) |
protected abstract ModuleDescriptor |
createModuleDescriptor(java.io.File moduleContentRoot,
java.util.Collection<DetectedSourceRoot> sourceRoots) |
java.util.Collection<LibraryDescriptor> |
getLibraryDependencies(ModuleDescriptor module) |
static java.util.Collection<LibraryDescriptor> |
getLibraryDependencies(ModuleDescriptor module,
java.util.List<? extends LibraryDescriptor> allLibraries) |
protected java.util.List<DetectedSourceRoot> |
getSourceRootsToScan() |
java.util.List<LibraryDescriptor> |
getSuggestedLibraries() |
java.util.List<ModuleDescriptor> |
getSuggestedModules() |
abstract boolean |
isApplicableRoot(DetectedProjectRoot root) |
protected boolean |
isEntryPointRoot(java.io.File srcRoot) |
protected boolean |
isIgnoredName(java.io.File sourceRoot) |
protected abstract boolean |
isLibraryFile(java.lang.String fileName) |
protected abstract boolean |
isSourceFile(java.io.File file) |
void |
merge(ModuleDescriptor mainModule,
ModuleDescriptor module) |
void |
moveJarsToLibrary(LibraryDescriptor from,
java.util.Collection<? extends java.io.File> files,
LibraryDescriptor to) |
void |
removeLibrary(LibraryDescriptor lib) |
void |
scanLibraries() |
protected abstract void |
scanLibraryForDeclaredPackages(java.io.File file,
Consumer<java.lang.String> result) |
void |
scanModules() |
protected abstract void |
scanSourceFileForImportedPackages(java.lang.CharSequence chars,
Consumer<java.lang.String> result) |
void |
setRoots(java.util.List<? extends java.io.File> contentRoots,
java.util.List<? extends DetectedSourceRoot> sourceRoots,
java.util.Set<java.lang.String> ignoredNames) |
LibraryDescriptor |
splitLibrary(LibraryDescriptor library,
java.lang.String newLibraryName,
java.util.Collection<? extends java.io.File> jarsToExtract) |
ModuleDescriptor |
splitModule(ModuleDescriptor descriptor,
java.lang.String newModuleName,
java.util.Collection<? extends java.io.File> contentsToExtract) |
protected final ProgressIndicatorWrapper myProgress
public ModuleInsight(ProgressIndicator progress, java.util.Set<java.lang.String> existingModuleNames, java.util.Set<java.lang.String> existingProjectLibraryNames)
public final void setRoots(java.util.List<? extends java.io.File> contentRoots, java.util.List<? extends DetectedSourceRoot> sourceRoots, java.util.Set<java.lang.String> ignoredNames)
public java.util.List<LibraryDescriptor> getSuggestedLibraries()
public java.util.List<ModuleDescriptor> getSuggestedModules()
public void scanModules()
protected void addExportedPackages(java.io.File sourceRoot, java.util.Set<java.lang.String> packages)
protected boolean isIgnoredName(java.io.File sourceRoot)
protected void addModules(java.util.Collection<? extends ModuleDescriptor> newModules)
protected java.util.List<DetectedSourceRoot> getSourceRootsToScan()
protected boolean isEntryPointRoot(java.io.File srcRoot)
protected abstract ModuleDescriptor createModuleDescriptor(java.io.File moduleContentRoot, java.util.Collection<DetectedSourceRoot> sourceRoots)
public void scanLibraries()
public abstract boolean isApplicableRoot(DetectedProjectRoot root)
public void merge(ModuleDescriptor mainModule, ModuleDescriptor module)
public LibraryDescriptor splitLibrary(LibraryDescriptor library, java.lang.String newLibraryName, java.util.Collection<? extends java.io.File> jarsToExtract)
public ModuleDescriptor splitModule(ModuleDescriptor descriptor, java.lang.String newModuleName, java.util.Collection<? extends java.io.File> contentsToExtract)
public void removeLibrary(LibraryDescriptor lib)
public void moveJarsToLibrary(LibraryDescriptor from, java.util.Collection<? extends java.io.File> files, LibraryDescriptor to)
public java.util.Collection<LibraryDescriptor> getLibraryDependencies(ModuleDescriptor module)
public static java.util.Collection<LibraryDescriptor> getLibraryDependencies(ModuleDescriptor module, java.util.List<? extends LibraryDescriptor> allLibraries)
protected abstract boolean isSourceFile(java.io.File file)
protected abstract void scanSourceFileForImportedPackages(java.lang.CharSequence chars, Consumer<java.lang.String> result)
protected abstract boolean isLibraryFile(java.lang.String fileName)
protected abstract void scanLibraryForDeclaredPackages(java.io.File file, Consumer<java.lang.String> result) throws java.io.IOException
java.io.IOException