com.intellij.openapi.roots
Class ModuleRootManager

java.lang.Object
  extended by com.intellij.openapi.roots.ModuleRootManager
All Implemented Interfaces:
ModuleRootModel

public abstract class ModuleRootManager
extends java.lang.Object
implements ModuleRootModel

Interface for getting information about the contents and dependencies of a module.


Constructor Summary
ModuleRootManager()
           
 
Method Summary
abstract  Module[] getDependencies()
          Returns the list of modules on which the current module directly depends.
abstract  ModuleFileIndex getFileIndex()
          Returns the file index for the current module.
abstract  VirtualFile[] getFiles(OrderRootType type)
          Returns the list of roots of the specified type for the current module and all modules it depends on.
static ModuleRootManager getInstance(Module module)
          Returns the module root manager instance for the specified module.
abstract  ModifiableRootModel getModifiableModel()
          Returns the interface for modifying the set of roots for this module.
abstract  java.lang.String[] getUrls(OrderRootType type)
          Returns the list of URLs of roots of the specified type for the current module and all modules it depends on.
abstract  boolean isDependsOn(Module module)
          Checks if the current module directly depends on the specified module.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.intellij.openapi.roots.ModuleRootModel
getCompilerOutputPath, getCompilerOutputPathForTests, getCompilerOutputPathForTestsUrl, getCompilerOutputPathUrl, getContentEntries, getContentRoots, getContentRootUrls, getDependencyModuleNames, getExcludeRoots, getExcludeRootUrls, getExplodedDirectory, getExplodedDirectoryUrl, getJavadocPaths, getJavadocUrls, getJdk, getModule, getOrderEntries, getSourceRoots, getSourceRootUrls, isJdkInherited, processOrder
 

Constructor Detail

ModuleRootManager

public ModuleRootManager()
Method Detail

getInstance

public static ModuleRootManager getInstance(Module module)
Returns the module root manager instance for the specified module.

Parameters:
module - the module for which the root manager is requested.
Returns:
the root manager instance.

getFiles

public abstract VirtualFile[] getFiles(OrderRootType type)
Returns the list of roots of the specified type for the current module and all modules it depends on.

Parameters:
type - the type of roots requested.
Returns:
the list of roots.

getUrls

public abstract java.lang.String[] getUrls(OrderRootType type)
Returns the list of URLs of roots of the specified type for the current module and all modules it depends on.

Parameters:
type - the type of roots requested.
Returns:
the list of root URLs.

getFileIndex

@NotNull
public abstract ModuleFileIndex getFileIndex()
Returns the file index for the current module.

Returns:
the file index instance.

getModifiableModel

@NotNull
public abstract ModifiableRootModel getModifiableModel()
Returns the interface for modifying the set of roots for this module. Must be called in a read action.

Returns:
the modifiable root model.

getDependencies

public abstract Module[] getDependencies()
Returns the list of modules on which the current module directly depends. The method does not traverse the entire dependency structure - dependencies of dependency modules are not included in the returned list.

Returns:
the list of module direct dependencies.

isDependsOn

public abstract boolean isDependsOn(Module module)
Checks if the current module directly depends on the specified module.

Returns:
true if module is contained in the list of dependencies for the current module, false otherwise.