public abstract class RootModelBase extends java.lang.Object implements ModuleRootModel
| Constructor and Description |
|---|
RootModelBase() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract java.util.Collection<ContentEntry> |
getContent() |
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 [] |
getModuleDependencies() |
Module [] |
getModuleDependencies(boolean includeTests) |
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetModule, getModuleExtension, getOrderEntriespublic VirtualFile [] getContentRoots()
ModuleRootModelgetContentRoots in interface ModuleRootModelModuleRootModel.getContentEntries()public java.lang.String [] getContentRootUrls()
ModuleRootModelgetContentRootUrls in interface ModuleRootModelModuleRootModel.getContentEntries()public java.lang.String [] getExcludeRootUrls()
ModuleRootModelgetExcludeRootUrls in interface ModuleRootModelModuleRootModel.getContentEntries()public VirtualFile [] getExcludeRoots()
ModuleRootModelgetExcludeRoots in interface ModuleRootModelModuleRootModel.getContentEntries()public java.lang.String [] getSourceRootUrls()
ModuleRootModelgetSourceRootUrls in interface ModuleRootModelModuleRootModel.getContentEntries(),
ModuleRootModel.getSourceRootUrls(boolean)public java.lang.String [] getSourceRootUrls(boolean includingTests)
ModuleRootModelgetSourceRootUrls in interface ModuleRootModelincludingTests - determines whether test source root urls should be included in the resultModuleRootModel.getContentEntries()public VirtualFile [] getSourceRoots()
ModuleRootModelgetSourceRoots in interface ModuleRootModelModuleRootModel.getContentEntries(),
ModuleRootModel.getSourceRoots(boolean)public VirtualFile [] getSourceRoots(boolean includingTests)
ModuleRootModelgetSourceRoots in interface ModuleRootModelincludingTests - determines whether test source roots should be included in the resultModuleRootModel.getContentEntries()public java.util.List<VirtualFile> getSourceRoots(JpsModuleSourceRootType<?> rootType)
ModuleRootModelgetSourceRoots in interface ModuleRootModelrootType - type of source rootspublic java.util.List<VirtualFile> getSourceRoots(java.util.Set<? extends JpsModuleSourceRootType<?>> rootTypes)
ModuleRootModelgetSourceRoots in interface ModuleRootModelrootTypes - types of source rootspublic ContentEntry [] getContentEntries()
ModuleRootModelgetContentEntries in interface ModuleRootModelContentEntryprotected abstract java.util.Collection<ContentEntry> getContent()
public Sdk getSdk()
ModuleRootModelgetSdk in interface ModuleRootModelModuleRootModel.isSdkInherited()public boolean isSdkInherited()
ModuleRootModeltrue if SDK for this module is inherited from a project.isSdkInherited in interface ModuleRootModelProjectRootManager.getProjectSdk(),
ProjectRootManager.setProjectSdk(Sdk)public OrderEnumerator orderEntries()
ModuleRootModelOrderEnumerator instance which can be used to process order entries of the module (with or without dependencies) and
collect classes or source roots.orderEntries in interface ModuleRootModelOrderEnumerator instancepublic <R> R processOrder(RootPolicy<R> policy, R initialValue)
ModuleRootModelprocessOrder in interface ModuleRootModelpolicy - the visitor to accept.initialValue - the default value to be returned by the visit process.OrderEntry.accept(RootPolicy, Object)public java.lang.String [] getDependencyModuleNames()
ModuleRootModelgetDependencyModuleNames in interface ModuleRootModelpublic Module [] getModuleDependencies()
getModuleDependencies in interface ModuleRootModelpublic Module [] getModuleDependencies(boolean includeTests)
getModuleDependencies in interface ModuleRootModel