# Class ModuleDependency

java.lang.Object
org.gradle.plugins.ide.idea.model.ModuleDependency

All Implemented Interfaces:
  `Dependency`

public class ModuleDependency extends Object implements Dependency
Represents an orderEntry of type module in the iml XML.

Since:
  1.0

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ModuleDependency(String name, String scope)`
  Creates a new `ModuleDependency`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addToNode(Node parentNode)`
  Add to node.
  `boolean`
  `equals(Object o)`
  `String`
  `getName()`
  The name of the module the module depends on.
  `String`
  `getScope()`
  The scope for this dependency.
  `int`
  `hashCode()`
  `boolean`
  `isExported()`
  Returns whether exported is set.
  `void`
  `setExported(boolean exported)`
  Sets the exported.
  `void`
  `setName(String name)`
  Sets the name.
  `void`
  `setScope(String scope)`
  The scope of this library.
  `String`
  `toString()`

  ### Methods inherited from class Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### ModuleDependency

    public ModuleDependency(String name, String scope)
    Creates a new `ModuleDependency`.
    Since:
      2.14

- ## Method Details

  - ### getName

    public String getName()
    The name of the module the module depends on. Must not be null.
    Since:
      1.0

  - ### setName

    public void setName(String name)
    Sets the name.
    Since:
      1.0

  - ### getScope

    public String getScope()
    The scope for this dependency. If null the scope attribute is not added.
    Specified by:
      `getScope` in interface `Dependency`

  - ### setScope

    public void setScope(String scope)
    Description copied from interface: `Dependency`
    The scope of this library. If `null`, the scope attribute is not added.
    Specified by:
      `setScope` in interface `Dependency`

  - ### isExported

    public boolean isExported()
    Returns whether exported is set.
    Since:
      1.0

  - ### setExported

    public void setExported(boolean exported)
    Sets the exported.
    Since:
      1.0

  - ### addToNode

    public void addToNode(Node parentNode)
    Description copied from interface: `Dependency`
    Add to node.
    Specified by:
      `addToNode` in interface `Dependency`

  - ### equals

    public boolean equals(Object o)
    Overrides:
      `equals` in class `Object`

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`