public interface ModuleRootModel
ModuleRootManager
.Modifier and Type | Method and Description |
---|---|
ContentEntry [] |
getContentEntries()
Use this method to obtain all content entries of a module.
|
VirtualFile [] |
getContentRoots()
Returns an array of content roots from all content entries.
|
java.lang.String [] |
getContentRootUrls()
Returns an array of content root urls from all content entries.
|
java.lang.String [] |
getDependencyModuleNames()
Returns list of module names this module depends on.
|
VirtualFile [] |
getExcludeRoots()
Returns an array of exclude roots from all content entries.
|
java.lang.String [] |
getExcludeRootUrls()
Returns an array of exclude root urls from all content entries.
|
Module |
getModule()
Returns the module to which the model belongs.
|
Module [] |
getModuleDependencies() |
Module [] |
getModuleDependencies(boolean includeTests) |
<T> T |
getModuleExtension(java.lang.Class<T> klass) |
OrderEntry [] |
getOrderEntries()
Use this method to obtain order of roots of a module.
|
Sdk |
getSdk()
Returns the SDK used by the module.
|
VirtualFile [] |
getSourceRoots()
Returns an array of source roots from all content entries.
|
VirtualFile [] |
getSourceRoots(boolean includingTests)
Returns an array of source roots from all content entries.
|
java.util.List<VirtualFile> |
getSourceRoots(JpsModuleSourceRootType<?> rootType)
Return a list of source roots of the specified type.
|
java.util.List<VirtualFile> |
getSourceRoots(java.util.Set<? extends JpsModuleSourceRootType<?>> rootTypes)
Return a list of source roots which types belong to the specified set.
|
java.lang.String [] |
getSourceRootUrls()
Returns an array of source root urls from all content entries.
|
java.lang.String [] |
getSourceRootUrls(boolean includingTests)
Returns an array of source root urls from all content entries.
|
boolean |
isSdkInherited()
Returns
true if SDK for this module is inherited from a project. |
OrderEnumerator |
orderEntries()
Returns
OrderEnumerator instance which can be used to process order entries of the module (with or without dependencies) and
collect classes or source roots. |
<R> R |
processOrder(RootPolicy<R> policy,
R initialValue)
Passes all order entries in the module to the specified visitor.
|
Module getModule()
ContentEntry [] getContentEntries()
ContentEntry
OrderEntry [] getOrderEntries()
Sdk getSdk()
isSdkInherited()
boolean isSdkInherited()
true
if SDK for this module is inherited from a project.ProjectRootManager.getProjectSdk()
,
ProjectRootManager.setProjectSdk(Sdk)
VirtualFile [] getContentRoots()
getContentEntries()
java.lang.String [] getContentRootUrls()
getContentEntries()
VirtualFile [] getExcludeRoots()
getContentEntries()
java.lang.String [] getExcludeRootUrls()
getContentEntries()
VirtualFile [] getSourceRoots()
getContentEntries()
,
getSourceRoots(boolean)
VirtualFile [] getSourceRoots(boolean includingTests)
includingTests
- determines whether test source roots should be included in the resultgetContentEntries()
java.util.List<VirtualFile> getSourceRoots(JpsModuleSourceRootType<?> rootType)
rootType
- type of source rootsjava.util.List<VirtualFile> getSourceRoots(java.util.Set<? extends JpsModuleSourceRootType<?>> rootTypes)
rootTypes
- types of source rootsjava.lang.String [] getSourceRootUrls()
getContentEntries()
,
getSourceRootUrls(boolean)
java.lang.String [] getSourceRootUrls(boolean includingTests)
includingTests
- determines whether test source root urls should be included in the resultgetContentEntries()
<R> R processOrder(RootPolicy<R> policy, R initialValue)
policy
- the visitor to accept.initialValue
- the default value to be returned by the visit process.OrderEntry.accept(RootPolicy, Object)
OrderEnumerator orderEntries()
OrderEnumerator
instance which can be used to process order entries of the module (with or without dependencies) and
collect classes or source roots.OrderEnumerator
instancejava.lang.String [] getDependencyModuleNames()
<T> T getModuleExtension(java.lang.Class<T> klass)
Module [] getModuleDependencies()
Module [] getModuleDependencies(boolean includeTests)