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, wait
getModule, getModuleExtension, getOrderEntries
public VirtualFile [] getContentRoots()
ModuleRootModel
getContentRoots
in interface ModuleRootModel
ModuleRootModel.getContentEntries()
public java.lang.String [] getContentRootUrls()
ModuleRootModel
getContentRootUrls
in interface ModuleRootModel
ModuleRootModel.getContentEntries()
public java.lang.String [] getExcludeRootUrls()
ModuleRootModel
getExcludeRootUrls
in interface ModuleRootModel
ModuleRootModel.getContentEntries()
public VirtualFile [] getExcludeRoots()
ModuleRootModel
getExcludeRoots
in interface ModuleRootModel
ModuleRootModel.getContentEntries()
public java.lang.String [] getSourceRootUrls()
ModuleRootModel
getSourceRootUrls
in interface ModuleRootModel
ModuleRootModel.getContentEntries()
,
ModuleRootModel.getSourceRootUrls(boolean)
public java.lang.String [] getSourceRootUrls(boolean includingTests)
ModuleRootModel
getSourceRootUrls
in interface ModuleRootModel
includingTests
- determines whether test source root urls should be included in the resultModuleRootModel.getContentEntries()
public VirtualFile [] getSourceRoots()
ModuleRootModel
getSourceRoots
in interface ModuleRootModel
ModuleRootModel.getContentEntries()
,
ModuleRootModel.getSourceRoots(boolean)
public VirtualFile [] getSourceRoots(boolean includingTests)
ModuleRootModel
getSourceRoots
in interface ModuleRootModel
includingTests
- determines whether test source roots should be included in the resultModuleRootModel.getContentEntries()
public java.util.List<VirtualFile> getSourceRoots(JpsModuleSourceRootType<?> rootType)
ModuleRootModel
getSourceRoots
in interface ModuleRootModel
rootType
- type of source rootspublic java.util.List<VirtualFile> getSourceRoots(java.util.Set<? extends JpsModuleSourceRootType<?>> rootTypes)
ModuleRootModel
getSourceRoots
in interface ModuleRootModel
rootTypes
- types of source rootspublic ContentEntry [] getContentEntries()
ModuleRootModel
getContentEntries
in interface ModuleRootModel
ContentEntry
protected abstract java.util.Collection<ContentEntry> getContent()
public Sdk getSdk()
ModuleRootModel
getSdk
in interface ModuleRootModel
ModuleRootModel.isSdkInherited()
public boolean isSdkInherited()
ModuleRootModel
true
if SDK for this module is inherited from a project.isSdkInherited
in interface ModuleRootModel
ProjectRootManager.getProjectSdk()
,
ProjectRootManager.setProjectSdk(Sdk)
public OrderEnumerator orderEntries()
ModuleRootModel
OrderEnumerator
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 ModuleRootModel
OrderEnumerator
instancepublic <R> R processOrder(RootPolicy<R> policy, R initialValue)
ModuleRootModel
processOrder
in interface ModuleRootModel
policy
- the visitor to accept.initialValue
- the default value to be returned by the visit process.OrderEntry.accept(RootPolicy, Object)
public java.lang.String [] getDependencyModuleNames()
ModuleRootModel
getDependencyModuleNames
in interface ModuleRootModel
public Module [] getModuleDependencies()
getModuleDependencies
in interface ModuleRootModel
public Module [] getModuleDependencies(boolean includeTests)
getModuleDependencies
in interface ModuleRootModel