# Class ModuleRequirement

java.lang.Object
org.eclipse.osgi.container.ModuleRequirement

All Implemented Interfaces:
  `BundleRequirement, Requirement`

public class ModuleRequirement extends Object implements BundleRequirement
An implementation of `BundleRequirement`. This requirement implements the matches method according to the OSGi specification which includes implementing the mandatory directive for the osgi.wiring.* namespaces.

Since:
  3.10
Restriction:
  This class is not intended to be subclassed by clients.

## Method Summary

Modifier and Type
Method
Description
`Map<String,Object>`
`getAttributes()`
`Map<String,String>`
`getDirectives()`
`String`
`getNamespace()`
`ModuleRevision`
`getResource()`
`ModuleRevision`
`getRevision()`
`boolean`
`matches(BundleCapability capability)`
`String`
`toString()`

### Methods inherited from class Object

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

### Methods inherited from interface Requirement

`equals, hashCode`

## Method Details

### getRevision

public ModuleRevision getRevision()

Specified by:
  `getRevision` in interface `BundleRequirement`

### matches

public boolean matches(BundleCapability capability)

Specified by:
  `matches` in interface `BundleRequirement`

### getNamespace

public String getNamespace()

Specified by:
  `getNamespace` in interface `BundleRequirement`
Specified by:
  `getNamespace` in interface `Requirement`

### getDirectives

public Map<String,String> getDirectives()

Specified by:
  `getDirectives` in interface `BundleRequirement`
Specified by:
  `getDirectives` in interface `Requirement`

### getAttributes

public Map<String,Object> getAttributes()

Specified by:
  `getAttributes` in interface `BundleRequirement`
Specified by:
  `getAttributes` in interface `Requirement`

### getResource

public ModuleRevision getResource()

Specified by:
  `getResource` in interface `BundleRequirement`
Specified by:
  `getResource` in interface `Requirement`

### toString

public String toString()

Overrides:
  `toString` in class `Object`