com.intellij.openapi.module
Interface Module

All Superinterfaces:
AreaInstance, ComponentManager, UserDataHolder

public interface Module
extends ComponentManager, AreaInstance

Represents a module in an IDEA project.

See Also:
ModuleManager.getModules(), ModuleComponent

Field Summary
static Module[] EMPTY_ARRAY
          The empty array of modules which cab be reused to avoid unnecessary allocations.
 
Method Summary
 VirtualFile getModuleFile()
          Returns the VirtualFile for the module .iml file.
 java.lang.String getModuleFilePath()
          Returns the path to the module .iml file.
 ModuleType getModuleType()
          Returns the type of this module.
 java.lang.String getName()
          Returns the name of this module.
 java.lang.String getOptionValue(java.lang.String optionName)
          Gets the value of a custom option for this module.
 PomModule getPom()
          Returns the POM representation of this module.
 Project getProject()
          Returns the project to which this module belongs.
 boolean isDisposed()
          Checks if the module instance has been disposed and unloaded.
 boolean isSavePathsRelative()
          Returns the value of the option "Use absolute/relative paths for files outside the module file directory" for this module.
 void setOption(java.lang.String optionName, java.lang.String optionValue)
          Sets a custom option for this module.
 void setSavePathsRelative(boolean b)
          Sets the value of the option "Use absolute/relative paths for files outside the module file directory" for this module.
 
Methods inherited from interface com.intellij.openapi.components.ComponentManager
getComponent, getComponent, getComponent, getComponentInterfaces, getComponents, getPicoContainer, hasComponent
 
Methods inherited from interface com.intellij.openapi.util.UserDataHolder
getUserData, putUserData
 

Field Detail

EMPTY_ARRAY

static final Module[] EMPTY_ARRAY
The empty array of modules which cab be reused to avoid unnecessary allocations.

Method Detail

getModuleFile

VirtualFile getModuleFile()
Returns the VirtualFile for the module .iml file.

Returns:
the virtual file instance.

getModuleFilePath

@NotNull
java.lang.String getModuleFilePath()
Returns the path to the module .iml file.

Returns:
the path to the .iml file.

getModuleType

@NotNull
ModuleType getModuleType()
Returns the type of this module.

Returns:
the module type.

getProject

@NotNull
Project getProject()
Returns the project to which this module belongs.

Returns:
the project instance.

getName

@NotNull
java.lang.String getName()
Returns the name of this module.

Returns:
the module name.

isDisposed

boolean isDisposed()
Checks if the module instance has been disposed and unloaded.

Returns:
true if the module has been disposed, false otherwise

isSavePathsRelative

boolean isSavePathsRelative()
Returns the value of the option "Use absolute/relative paths for files outside the module file directory" for this module.

Returns:
true if relative paths are used, false if absolute paths are used.

setSavePathsRelative

void setSavePathsRelative(boolean b)
Sets the value of the option "Use absolute/relative paths for files outside the module file directory" for this module.

Parameters:
b - true if relative paths are used, false if absolute paths are used.

setOption

void setOption(@NotNull
               java.lang.String optionName,
               @NotNull
               java.lang.String optionValue)
Sets a custom option for this module.

Parameters:
optionName - the name of the custom option.
optionValue - the value of the custom option.

getOptionValue

@Nullable
java.lang.String getOptionValue(@NotNull
                                         java.lang.String optionName)
Gets the value of a custom option for this module.

Parameters:
optionName - the name of the custom option.
Returns:
the value of the custom option, or null if no value has been set.

getPom

@NotNull
PomModule getPom()
Returns the POM representation of this module.

Returns:
the POM module instance.