T - the (base) container element typejava.util.Collection<T>, org.gradle.util.Configurable<T>, DomainObjectCollection<T>, java.lang.Iterable<T>, NamedDomainObjectCollection<T>, NamedDomainObjectContainer<T>, org.gradle.api.internal.rules.NamedDomainObjectFactoryRegistry<T>, NamedDomainObjectSet<T>, PolymorphicDomainObjectContainer<T>, java.util.Set<T>NativeToolChainRegistry, PlatformContainer, PublicationContainerpublic interface ExtensiblePolymorphicDomainObjectContainer<T> extends PolymorphicDomainObjectContainer<T>, org.gradle.api.internal.rules.NamedDomainObjectFactoryRegistry<T>
PolymorphicDomainObjectContainer that can be extended at runtime to
create elements of new types.| Modifier and Type | Method | Description |
|---|---|---|
<U extends T> |
registerBinding(java.lang.Class<U> type,
java.lang.Class<? extends U> implementationType) |
Registers a binding from the specified "public" domain object type to the specified implementation type.
|
<U extends T> |
registerFactory(java.lang.Class<U> type,
groovy.lang.Closure<? extends U> factory) |
Registers a factory for creating elements of the specified type.
|
<U extends T> |
registerFactory(java.lang.Class<U> type,
NamedDomainObjectFactory<? extends U> factory) |
Registers a factory for creating elements of the specified type.
|
clear, contains, containsAll, equals, hashCode, isEmpty, iterator, parallelStream, remove, removeAll, removeIf, retainAll, size, spliterator, stream, toArray, toArrayaddAllLater, addLater, all, all, configureEach, whenObjectAdded, whenObjectAdded, whenObjectRemoved, whenObjectRemoved, withType, withTypeadd, addAll, addRule, addRule, addRule, findByName, getAsMap, getAt, getByName, getByName, getByName, getCollectionSchema, getNamer, getNames, getRules, named, named, named, namedconfigure, create, create, create, maybeCreate, register, registerfindAll, matching, matching, withTypecontainerWithType, create, create, maybeCreate, register, register<U extends T> void registerFactory(java.lang.Class<U> type, NamedDomainObjectFactory<? extends U> factory)
registerFactory in interface org.gradle.api.internal.rules.NamedDomainObjectFactoryRegistry<T>U - the type of objects created by the factorytype - the type of objects created by the factoryfactory - the factory to registerjava.lang.IllegalArgumentException - if the specified type is not a subtype of the container element type<U extends T> void registerFactory(java.lang.Class<U> type, groovy.lang.Closure<? extends U> factory)
U - the type of objects created by the factorytype - the type of objects created by the factoryfactory - the factory to registerjava.lang.IllegalArgumentException - if the specified type is not a subtype of the container element type<U extends T> void registerBinding(java.lang.Class<U> type, java.lang.Class<? extends U> implementationType)
Inject, its arguments will be injected.
In general, registering a binding is preferable over implementing and registering a factory.
U - a public domain object typetype - a public domain object typeimplementationType - the corresponding implementation type