Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for forObject (0.3 sec)

  1. platforms/core-configuration/core-serialization-codecs/src/main/kotlin/org/gradle/internal/serialize/codecs/core/jos/MethodCache.kt

    import java.lang.reflect.Method
    
    
    internal
    class MethodCache(
    
        private
        val predicate: Method.() -> Boolean
    
    ) {
        private
        val methodCache = hashMapOf<Class<*>, Method?>()
    
        fun forObject(value: Any) =
            forClass(value.javaClass)
    
        fun forClass(type: Class<*>) = methodCache.computeIfAbsent(type) {
            it.firstAccessibleMatchingMethodOrNull(predicate)
        }
    }
    
    
    internal
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Jun 07 23:09:56 UTC 2024
    - 1.6K bytes
    - Viewed (0)
Back to top