Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 8,397 for KClass (0.15 seconds)

  1. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/Tags.kt

     */
    internal sealed class Tags {
      /**
       * Returns a tags instance that maps [key] to [value]. If [value] is null, this returns a tags
       * instance that does not have any mapping for [key].
       */
      abstract fun <T : Any> plus(
        key: KClass<T>,
        value: T?,
      ): Tags
    
      abstract operator fun <T : Any> get(key: KClass<T>): T?
    }
    
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Fri Oct 24 11:37:46 GMT 2025
    - 3.9K bytes
    - Click Count (0)
  2. okhttp-testing-support/src/main/kotlin/okhttp3/FailingCall.kt

      override fun <T : Any> tag(type: KClass<T>): T? = error("unexpected")
    
      override fun <T> tag(type: Class<out T>): T? = error("unexpected")
    
      override fun <T : Any> tag(
        type: KClass<T>,
        computeIfAbsent: () -> T,
      ): T = error("unexpected")
    
      override fun <T : Any> tag(
        type: Class<T>,
        computeIfAbsent: () -> T,
      ): T = error("unexpected")
    
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Wed Nov 05 18:28:35 GMT 2025
    - 1.6K bytes
    - Click Count (0)
  3. okhttp-testing-support/src/main/kotlin/okhttp3/OkHttpDebugLogging.kt

    import kotlin.reflect.KClass
    import okhttp3.internal.concurrent.TaskRunner
    import okhttp3.internal.http2.Http2
    
    object OkHttpDebugLogging {
      // Keep references to loggers to prevent their configuration from being GC'd.
      private val configuredLoggers = CopyOnWriteArraySet<Logger>()
    
      fun enableHttp2() = enable(Http2::class)
    
      fun enableTaskRunner() = enable(TaskRunner::class)
    
      fun logHandler() =
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.9K bytes
    - Click Count (0)
  4. build-logic/kotlin-dsl-shared-runtime/src/main/kotlin/org/gradle/kotlin/dsl/internal/sharedruntime/codegen/ApiExtensionGeneratorFacade.kt

    //
    // Rules
    // 1. an extension should either require no type parameters, a single reifeid type parameter, at call site
    // 2. all type parameters must all be reifeid or values (TypeOf, KClass or Class)
    // 3. when overloading, prefer TypeOf over Class
    // 4. in case the policy forbids your overloads, discuss
    private
    fun kotlinExtensionFunctionsFor(type: ApiType, sinceSupplier: (String) -> String?): Sequence<KotlinExtensionFunction> =
    Created: Wed Dec 31 11:36:14 GMT 2025
    - Last Modified: Wed Mar 12 15:56:18 GMT 2025
    - 17.8K bytes
    - Click Count (0)
  5. build-logic/integration-testing/src/main/kotlin/gradlebuild/integrationtests/action/AnnotationGeneratorWorkAction.kt

        }
    
        private
        inline fun <reified Receiver> groovyReceiverAccessors(): String {
            return groovyReceiverAccessors(Receiver::class)
        }
    
        private
        fun groovyReceiverAccessors(receiverType: KClass<*>): String {
            val objectMethods = Any::class.java.declaredMethods.toList()
            return receiverType
                .memberFunctions
                .asSequence()
    Created: Wed Dec 31 11:36:14 GMT 2025
    - Last Modified: Sun Jul 07 16:02:18 GMT 2024
    - 8.1K bytes
    - Click Count (0)
  6. okhttp/src/commonJvmAndroid/kotlin/okhttp3/Call.kt

       * val copy = original.clone()
       *
       * val myTag = original.tag(MyTag::class)
       * if (myTag != null) {
       *   copy.tag(MyTag::class) { myTag }
       * }
       * ```
       *
       * ```java
       * Call copy = original.clone();
       *
       * MyTag myTag = original.tag(MyTag.class);
       * if (myTag != null) {
       *   copy.tag(MyTag.class, () -> myTag);
       * }
       * ```
       *
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Wed Nov 05 18:28:35 GMT 2025
    - 6.8K bytes
    - Click Count (0)
  7. okhttp/src/jvmTest/kotlin/okhttp3/ServerTruncatesRequestTest.kt

        }
    
        val expectedEvents = mutableListOf<KClass<out CallEvent>>()
        // Start out with standard events...
        expectedEvents += CallStart::class
        expectedEvents += ProxySelectStart::class
        expectedEvents += ProxySelectEnd::class
        expectedEvents += DnsStart::class
        expectedEvents += DnsEnd::class
        expectedEvents += ConnectStart::class
        if (https) {
          expectedEvents += SecureConnectStart::class
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Tue Nov 04 19:13:52 GMT 2025
    - 10.4K bytes
    - Click Count (0)
  8. okhttp/src/commonJvmAndroid/kotlin/okhttp3/Request.kt

      @JvmName("reifiedTag")
      inline fun <reified T : Any> tag(): T? = tag(T::class)
    
      /** Returns the tag attached with [type] as a key, or null if no tag is attached with that key. */
      fun <T : Any> tag(type: KClass<T>): T? = type.java.cast(tags[type])
    
      /**
       * Returns the tag attached with `Object.class` as a key, or null if no tag is attached with
       * that key.
       *
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Thu Oct 30 13:46:58 GMT 2025
    - 14.7K bytes
    - Click Count (1)
  9. okhttp-dnsoverhttps/src/test/java/okhttp3/dnsoverhttps/DnsOverHttpsTest.kt

        assertThat(recordedRequest.url.encodedQuery)
          .isEqualTo("ct&dns=AAABAAABAAAAAAAABmdvb2dsZQNjb20AAAEAAQ")
    
        assertThat(cacheEvents()).containsExactly(CacheMiss::class)
      }
    
      private fun cacheEvents(): List<KClass<out CallEvent>> =
        eventRecorder
          .recordedEventTypes()
          .filter { "Cache" in it.simpleName!! }
          .also { eventRecorder.clearAllEvents() }
    
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Tue Nov 04 19:13:52 GMT 2025
    - 11.9K bytes
    - Click Count (0)
  10. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/connection/RealCall.kt

      }
    
      override fun <T : Any> tag(type: KClass<T>): T? = type.java.cast(tags.get()[type])
    
      override fun <T> tag(type: Class<out T>): T? = tag(type.kotlin)
    
      override fun <T : Any> tag(
        type: KClass<T>,
        computeIfAbsent: () -> T,
      ): T = tags.computeIfAbsent(type, computeIfAbsent)
    
      override fun <T : Any> tag(
        type: Class<T>,
        computeIfAbsent: () -> T,
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Wed Nov 05 18:28:35 GMT 2025
    - 19.7K bytes
    - Click Count (0)
Back to Top