Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 22 for registerFactory (0.22 sec)

  1. platforms/core-configuration/model-core/src/test/groovy/org/gradle/model/internal/typeregistration/BaseInstanceFactoryTest.groovy

            expect:
            instanceFactory.getSupportedTypes() == ([ModelType.of(ManagedThingSpec)] as Set)
        }
    
        def "can register implementation"() {
            instanceFactory.registerFactory(DefaultThingSpec, factoryMock)
            instanceFactory.register(ModelType.of(ThingSpec), new SimpleModelRuleDescriptor("thing"))
                .withImplementation(ModelType.of(DefaultThingSpec))
    
            when:
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 09:51:04 UTC 2023
    - 15.7K bytes
    - Viewed (0)
  2. platforms/core-configuration/model-core/src/testFixtures/groovy/org/gradle/api/internal/rules/DefaultRuleAwarePolymorphicNamedEntityInstantiator.java

            return instantiator.create(name, type);
        }
    
        @Override
        public <U extends T> void registerFactory(Class<U> type, NamedDomainObjectFactory<? extends U> factory, ModelRuleDescriptor descriptor) {
            registry.registerFactory(type, factory, descriptor);
        }
    
        @Override
        public Set<? extends Class<? extends T>> getCreatableTypes() {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 09:51:04 UTC 2023
    - 2.2K bytes
    - Viewed (0)
  3. platforms/software/platform-base/src/main/java/org/gradle/platform/base/component/internal/ComponentSpecFactory.java

            super(ComponentSpec.class);
            this.projectIdentifier = projectIdentifier;
            registerFactory(DefaultComponentSpec.class, new ImplementationFactory<ComponentSpec, DefaultComponentSpec>() {
                @Override
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Oct 11 12:16:09 UTC 2023
    - 5.1K bytes
    - Viewed (0)
  4. platforms/core-configuration/model-core/src/testFixtures/groovy/org/gradle/api/internal/rules/DefaultRuleAwareNamedDomainObjectFactoryRegistry.java

        @Override
        public <U extends T> void registerFactory(Class<U> type, NamedDomainObjectFactory<? extends U> factory) {
            registerFactory(type, factory, null);
        }
    
        @Override
        public <U extends T> void registerFactory(Class<U> type, NamedDomainObjectFactory<? extends U> factory, ModelRuleDescriptor descriptor) {
            checkCanRegister(type, descriptor);
            delegate.registerFactory(type, factory);
        }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Dec 11 13:37:56 UTC 2023
    - 2.5K bytes
    - Viewed (0)
  5. platforms/core-configuration/model-core/src/test/groovy/org/gradle/model/NodeBackedModelMapSpec.groovy

            given:
            def mmType = ModelTypes.modelMap(Bean)
            registry
                .registerModelMap("beans", Bean) {
                    it.registerFactory(Bean) { new Bean(name: it) }
                    it.registerFactory(SpecialBean) { new SpecialBean(name: it) }
                }
                .registerInstance("s", "other")
                .mutate {
                    it.path("beans").type(mmType).action { c ->
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 09:51:04 UTC 2023
    - 38.3K bytes
    - Viewed (0)
  6. platforms/core-configuration/model-core/src/test/groovy/org/gradle/model/UnmanagedNodeBackedModelMapTest.groovy

                super(type, instantiator, namer)
            }
    
            @Override
            <U extends T> void registerFactory(Class<U> type, NamedDomainObjectFactory<? extends U> factory, ModelRuleDescriptor descriptor) {
                registerFactory(type, factory)
            }
        }
    
        Class<NamedThing> itemClass = NamedThing
        Class<SpecialNamedThing> specialItemClass = SpecialNamedThing
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 09:51:04 UTC 2023
    - 3.4K bytes
    - Viewed (0)
  7. platforms/software/publish/src/test/groovy/org/gradle/api/publish/internal/DefaultPublicationContainerTest.groovy

        }
    
        def "can add and configure publication with API"() {
            given:
            Publication pub = publication("test")
            NamedDomainObjectFactory<Publication> factory = Mock()
            container.registerFactory(Publication, factory)
    
            when:
            container.create("name", Publication) {
                value = 2
            }
    
            then:
            1 * factory.create("name") >> pub
    
            and:
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Oct 12 14:02:46 UTC 2023
    - 3.2K bytes
    - Viewed (0)
  8. platforms/native/platform-native/src/main/java/org/gradle/nativeplatform/plugins/NativeComponentModelPlugin.java

                        return instantiator.newInstance(DefaultNativePlatform.class, name);
                    }
                };
    
                platforms.registerFactory(NativePlatform.class, nativePlatformFactory);
    
                platforms.registerFactory(Platform.class, nativePlatformFactory);
            }
    
            @ComponentType
            void registerSharedLibraryBinaryType(TypeBuilder<SharedLibraryBinarySpec> builder) {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Nov 16 20:20:03 UTC 2023
    - 24.1K bytes
    - Viewed (0)
  9. platforms/core-configuration/model-core/src/testFixtures/groovy/org/gradle/api/internal/rules/RuleAwareNamedDomainObjectFactoryRegistry.java

    import org.gradle.model.internal.core.rule.describe.ModelRuleDescriptor;
    
    public interface RuleAwareNamedDomainObjectFactoryRegistry<T> extends NamedDomainObjectFactoryRegistry<T> {
    
        <U extends T> void registerFactory(Class<U> type, NamedDomainObjectFactory<? extends U> factory, ModelRuleDescriptor descriptor);
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 09:51:04 UTC 2023
    - 1K bytes
    - Viewed (0)
  10. platforms/native/platform-native/src/main/java/org/gradle/nativeplatform/toolchain/plugins/ClangCompilerPlugin.java

                final WorkerLeaseService workerLeaseService = serviceRegistry.get(WorkerLeaseService.class);
    
                toolChainRegistry.registerFactory(Clang.class, new NamedDomainObjectFactory<Clang>() {
                    @Override
                    public Clang create(String name) {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Nov 16 20:20:03 UTC 2023
    - 3.8K bytes
    - Viewed (0)
Back to top