Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 576 for typeOf (0.09 sec)

  1. subprojects/core-api/src/main/java/org/gradle/api/reflect/TypeOf.java

         * @return the {@literal TypeOf} that captures the generic type of the given {@literal Type}
         */
        public static <T> TypeOf<T> typeOf(Type type) {
            return new TypeOf<T>(
                Cast.<ModelType<T>>uncheckedCast(
                    ModelType.of(typeWhichCannotBeNull(type)))) {
            };
        }
    
        /**
         * Constructs a new parameterized type from a given parameterized type definition and an array of type arguments.
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Apr 26 09:45:59 UTC 2024
    - 10.9K bytes
    - Viewed (0)
  2. src/cmd/vendor/golang.org/x/tools/go/ast/inspector/typeof.go

    	nTypeSpec
    	nTypeSwitchStmt
    	nUnaryExpr
    	nValueSpec
    )
    
    // typeOf returns a distinct single-bit value that represents the type of n.
    //
    // Various implementations were benchmarked with BenchmarkNewInspector:
    //
    //	                                                                GOGC=off
    //	- type switch					4.9-5.5ms	2.1ms
    //	- binary search over a sorted list of types	5.5-5.9ms	2.5ms
    //	- linear scan, frequency-ordered list		5.9-6.1ms	2.7ms
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 18 21:28:13 UTC 2023
    - 4.8K bytes
    - Viewed (0)
  3. src/reflect/type_test.go

    		{"func(func(int, int))", reflect.TypeOf(func(func(int, int)) {}), false},
    		{"int64", reflect.TypeOf(int64(1)), false},
    		{"uint64", reflect.TypeOf(uint64(1)), false},
    		{"*[4]int", reflect.TypeOf(&[4]int{}), true},
    		{"chan int64", reflect.TypeOf(make(chan int64)), false},
    		{"map[int]int", reflect.TypeOf(make(map[int]int)), true},
    		{"string", reflect.TypeOf(""), true},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 23:39:44 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  4. platforms/core-configuration/model-core/src/test/groovy/org/gradle/internal/extensibility/ExtensionsStorageTest.groovy

                [name: 'testExtension', type: new TypeOf<TestExtension>() {}]
            ]
        }
    
        def "only considers public type when addressing extensions by type"() {
            given:
            Integer number = 23
            storage.add typeOf(Number), 'number', number
    
            expect:
            storage.findByType(typeOf(Integer)) == null
            storage.findByType(typeOf(Number)) == number
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 09:51:04 UTC 2023
    - 4.4K bytes
    - Viewed (0)
  5. platforms/core-configuration/kotlin-dsl-integ-tests/src/integTest/kotlin/org/gradle/kotlin/dsl/integration/ProjectSchemaLambdaAccessorsIntegrationTest.kt

            }
    
            withBuildScript(
                """
                plugins {
                    my
                }
    
                inline fun <reified T> typeOf(value: T) = typeOf<T>()
    
                println("closureExtension: " + typeOf(closureExtension))
    
                val casted = closureExtension as groovy.lang.Closure<*>
                println(casted.call("some"))
                """
            )
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Sun Sep 24 17:45:43 UTC 2023
    - 8.4K bytes
    - Viewed (0)
  6. platforms/core-configuration/declarative-dsl-core/src/test/kotlin/org/gradle/internal/declarativedsl/schemaBuidler/TreatInterfaceAsConfigureLambdaTest.kt

        @Test
        fun recognizesLambdaType() {
            assertEquals(typeOf<Int>(), customConfigureLambdas.getTypeConfiguredByLambda(typeOf<MyFunctionalInterface<Int>>()))
            assertTrue { customConfigureLambdas.isConfigureLambdaForType(typeOf<Int>(), typeOf<MyFunctionalInterface<Int>>()) }
            assertFalse { customConfigureLambdas.isConfigureLambdaForType(typeOf<String>(), typeOf<MyFunctionalInterface<Int>>()) }
        }
    
        @Test
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Feb 02 10:53:44 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  7. platforms/core-configuration/model-core/src/test/groovy/org/gradle/internal/extensibility/ExtensionContainerTest.groovy

                          bar: typeOf(Capability),
                          boo: typeOf(Child),
                          baz: new TypeOf<List<String>>() {},
                          cat: typeOf(Thing),
                          meo: typeOf(Thing)]
        }
    
        def "can configure extensions by name"() {
            given:
            container.add "foo", extension
    
            when:
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 09:51:04 UTC 2023
    - 8.5K bytes
    - Viewed (0)
  8. platforms/core-configuration/kotlin-dsl/src/test/kotlin/org/gradle/kotlin/dsl/ExtensionContainerExtensionsTest.kt

            val extensions = mock<ExtensionContainer>()
            doNothing().`when`(extensions).add(any<TypeOf<SomeExtension<*>>>(), any(), any())
    
            val instance = SomeExtension("some")
            extensions.add<SomeExtension<String>>("name", instance)
    
            inOrder(extensions) {
                verify(extensions).add(typeOf<SomeExtension<String>>(), "name", instance)
                verifyNoMoreInteractions()
            }
        }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Aug 02 08:06:49 UTC 2023
    - 3.3K bytes
    - Viewed (0)
  9. platforms/core-configuration/kotlin-dsl/src/main/kotlin/org/gradle/kotlin/dsl/TypeOfExtensions.kt

     */
    package org.gradle.kotlin.dsl
    
    import org.gradle.api.reflect.TypeOf
    
    
    /**
     * Creates an instance of [TypeOf] for the given parameterized type.
     *
     * @param T the type
     * @return the [TypeOf] that captures the generic type of the given parameterized type
     */
    inline fun <reified T> typeOf(): TypeOf<T> =
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Aug 02 08:06:49 UTC 2023
    - 947 bytes
    - Viewed (0)
  10. src/encoding/gob/type_test.go

    	var s []int
    	sint := getTypeUnlocked("slice", reflect.TypeOf(s))
    	var news []int
    	newsint := getTypeUnlocked("slice1", reflect.TypeOf(news))
    	if sint != newsint {
    		t.Errorf("second registration of []int creates new type")
    	}
    	var b []bool
    	sbool := getTypeUnlocked("", reflect.TypeOf(b))
    	if sbool == sint {
    		t.Errorf("registration of []bool creates same type as []int")
    	}
    	str := sbool.string()
    	expected := "[]bool"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 01 14:26:13 UTC 2023
    - 6.1K bytes
    - Viewed (0)
Back to top