Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | METHOD | DETAIL: FIELD | METHOD

## org.gradle.api
Interface DomainObjectContainer

    org.gradle.api.DomainObjectContainer
      org.gradle.api.DomainObjectCollection

All Superinterfaces:
  DomainObjectCollection

    interface DomainObjectContainer
    extends DomainObjectCollection

A `DomainObjectContainer` represents a mutable collection of domain objects of type `T`.

param:
  The type of domain objects in this container.

Method Summary
`Rule` | `addRule(Rule rule)` Adds a rule to this container.
`List` | `getRules()` Returns the rules used by this container.

Methods inherited from interface DomainObjectCollection
allObjects, allObjects, findAll, findByName, getAll, getAsMap, getAt, getByName, getByName, matching, whenObjectAdded, whenObjectAdded, whenObjectRemoved, withType

Methods inherited from interface java.lang.Iterable
iterator

Methods inherited from class java.lang.Object
hashCode, getClass, equals, toString, wait, wait, wait, notify, notifyAll

Method Detail

### addRule

    public Rule addRule(Rule rule)

  Adds a rule to this container. The given rule is invoked when an unknown object is requested by name.
  param:
    rule The rule to add.
  return:
    The added rule.

### getRules

    public List getRules()

  Returns the rules used by this container.
  return:
    The rules, in the order they will be applied.

Groovy Documentation