org.gradle.api
[Java] Interface ExtensiblePolymorphicDomainObjectContainer
org.gradle.api.DomainObjectCollection
org.gradle.api.NamedDomainObjectContainer
org.gradle.api.ExtensiblePolymorphicDomainObjectContainer
java.lang.Iterable
org.gradle.api.NamedDomainObjectSet
org.gradle.api.NamedDomainObjectCollection
org.gradle.api.PolymorphicDomainObjectContainer
java.util.Collection
org.gradle.util.Configurable
- All Superinterfaces:
- DomainObjectCollection, NamedDomainObjectContainer, Iterable, NamedDomainObjectSet, NamedDomainObjectCollection, PolymorphicDomainObjectContainer, Collection, Configurable
@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
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 factoryfactory
- the factory to register
- the type of objects created by the factory
Gradle API 1.5