Search in sources :

Example 1 with ReflectiveNamedDomainObjectFactory

use of org.gradle.api.internal.ReflectiveNamedDomainObjectFactory in project gradle by gradle.

the class DefaultDomainObjectCollectionFactory method container.

private <T> NamedDomainObjectContainer<T> container(Class<T> elementType, InstanceGenerator elementInstantiator) {
    ReflectiveNamedDomainObjectFactory<T> objectFactory = new ReflectiveNamedDomainObjectFactory<T>(elementType, elementInstantiator);
    Instantiator instantiator = instantiatorFactory.decorateLenient();
    return Cast.uncheckedCast(instantiator.newInstance(FactoryNamedDomainObjectContainer.class, elementType, instantiator, new DynamicPropertyNamer(), objectFactory, mutationGuard, collectionCallbackActionDecorator));
}
Also used : ReflectiveNamedDomainObjectFactory(org.gradle.api.internal.ReflectiveNamedDomainObjectFactory) DynamicPropertyNamer(org.gradle.api.internal.DynamicPropertyNamer) FactoryNamedDomainObjectContainer(org.gradle.api.internal.FactoryNamedDomainObjectContainer) Instantiator(org.gradle.internal.reflect.Instantiator)

Aggregations

DynamicPropertyNamer (org.gradle.api.internal.DynamicPropertyNamer)1 FactoryNamedDomainObjectContainer (org.gradle.api.internal.FactoryNamedDomainObjectContainer)1 ReflectiveNamedDomainObjectFactory (org.gradle.api.internal.ReflectiveNamedDomainObjectFactory)1 Instantiator (org.gradle.internal.reflect.Instantiator)1