Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 5,261 for KClass (0.03 sec)

  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?
    }
    
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Fri Oct 24 11:37:46 UTC 2025
    - 3.9K bytes
    - Viewed (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")
    
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Wed Nov 05 18:28:35 UTC 2025
    - 1.6K bytes
    - Viewed (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() =
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 1.9K bytes
    - Viewed (0)
  4. 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
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Tue Nov 04 19:13:52 UTC 2025
    - 10.4K bytes
    - Viewed (0)
  5. 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.
       *
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Thu Oct 30 13:46:58 UTC 2025
    - 14.7K bytes
    - Viewed (1)
  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);
       * }
       * ```
       *
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Wed Nov 05 18:28:35 UTC 2025
    - 6.8K bytes
    - Viewed (0)
  7. 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,
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Wed Nov 05 18:28:35 UTC 2025
    - 19.7K bytes
    - Viewed (0)
  8. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/Adapters.kt

          ByteString::class to OCTET_STRING,
          Unit::class to NULL,
          Nothing::class to OBJECT_IDENTIFIER,
          Nothing::class to UTF8_STRING,
          String::class to PRINTABLE_STRING,
          Nothing::class to IA5_STRING,
          Nothing::class to UTC_TIME,
          Long::class to GENERALIZED_TIME,
          AnyValue::class to ANY_VALUE,
        )
    
      fun any(
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 15K bytes
    - Viewed (0)
  9. okhttp/src/jvmTest/kotlin/okhttp3/KotlinSourceModernTest.kt

            override fun <T : Any> tag(type: KClass<T>): T? = TODO()
    
            override fun <T> tag(type: Class<out T>): T? = TODO()
    
            override fun <T : Any> tag(
              type: KClass<T>,
              computeIfAbsent: () -> T,
            ): T = TODO()
    
            override fun <T : Any> tag(
              type: Class<T>,
              computeIfAbsent: () -> T,
            ): T = TODO()
    
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Wed Nov 05 18:28:35 UTC 2025
    - 47K bytes
    - Viewed (0)
  10. 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() }
    
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Tue Nov 04 19:13:52 UTC 2025
    - 11.9K bytes
    - Viewed (0)
Back to top