Groovy Documentation

org.gradle.api
[Java] Interface ExtensiblePolymorphicDomainObjectContainer

org.gradle.api.NamedDomainObjectContainer
  org.gradle.api.ExtensiblePolymorphicDomainObjectContainer
      org.gradle.util.Configurable
          org.gradle.api.NamedDomainObjectCollection
              java.lang.Iterable
                  org.gradle.api.NamedDomainObjectSet
                      org.gradle.api.PolymorphicDomainObjectContainer
                          java.util.Collection
                              org.gradle.api.DomainObjectCollection
All Superinterfaces:
NamedDomainObjectContainer, Configurable, NamedDomainObjectCollection, Iterable, NamedDomainObjectSet, PolymorphicDomainObjectContainer, Collection, DomainObjectCollection

@Incubating
public interface ExtensiblePolymorphicDomainObjectContainer
extends PolymorphicDomainObjectContainer

A PolymorphicDomainObjectContainer that can be extended at runtime to create elements of new types.

Parameters:
- the (base) container element type


Method Summary
void registerFactory(Class type, NamedDomainObjectFactory factory)

Registers a factory for creating elements of the specified type.

 
Methods inherited from interface PolymorphicDomainObjectContainer
create, create
 
Methods inherited from interface NamedDomainObjectContainer
configure, create, create, maybeCreate
 
Methods inherited from interface NamedDomainObjectSet
findAll, matching, matching, withType
 
Methods inherited from interface NamedDomainObjectCollection
add, addAll, addRule, addRule, findByName, getAsMap, getAt, getByName, getByName, getNamer, getRules, matching, matching, withType
 
Methods inherited from interface Set
add, remove, equals, hashCode, clear, isEmpty, contains, size, toArray, toArray, addAll, iterator, containsAll, removeAll, retainAll
 

Method Detail

registerFactory

public void registerFactory(Class type, NamedDomainObjectFactory factory)
Registers a factory for creating elements of the specified type. Typically, the specified type is an interface type.
throws:
IllegalArgumentException if the specified type is not a subtype of the container element type
Parameters:
type - the type of objects created by the factory
factory - the factory to register
- the type of objects created by the factory


 

Gradle API 1.5