Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.gradle.api
Interface NamedDomainObjectContainer<T>

Type Parameters:
  `T` - The type of domain objects in this container.

All Superinterfaces:
  DomainObjectCollection<T>, Iterable<T>, NamedDomainObjectCollection<T>

All Known Subinterfaces:
  ConfigurationContainer, RepositoryHandler, ResolverContainer, SourceSetContainer, TaskContainer

    public interface NamedDomainObjectContainer<T>

extends NamedDomainObjectCollection<T>

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

Method Summary
`Rule` | `addRule(Rule rule)` Adds a rule to this container.
`Rule` | `addRule(String description, Closure ruleAction)` Adds a rule to this container.
`List<Rule>` | `getRules()` Returns the rules used by this container.

Methods inherited from interface org.gradle.api.NamedDomainObjectCollection
`findByName, getAsMap, getAt, getByName, getByName, matching, matching, withType`

Methods inherited from interface org.gradle.api.DomainObjectCollection
`all, all, allObjects, allObjects, findAll, getAll, whenObjectAdded, whenObjectAdded, whenObjectRemoved, withType, withType`

Methods inherited from interface java.lang.Iterable
`iterator`

Method Detail

### addRule

    Rule addRule(Rule rule)

  Adds a rule to this container. The given rule is invoked when an unknown object is requested by name.

  Parameters:
    `rule` - The rule to add.
  Returns:
    The added rule.

### addRule

    Rule addRule(String description,
                 Closure ruleAction)

  Adds a rule to this container. The given closure is executed when an unknown object is requested by name. The requested name is passed to the closure as a parameter.

  Parameters:
    `description` - The description of the rule.
    `ruleAction` - The closure to execute to apply the rule.
  Returns:
    The added rule.

### getRules

    List<Rule> getRules()

  Returns the rules used by this container.

  Returns:
    The rules, in the order they will be applied.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD