• d

    dszopa

    5 years ago
    Specifically when I debug I see that the java type shows up as
    javaType!
    indicating it could be nullable or non nullable, where as the kotlin type shows up as kotlinType?indicating nullable
    d
    1 replies
    Copy to Clipboard
  • m

    mp911de

    5 years ago
    Hi there. Is there some documentation on Kotlin’s synthetic constructor generation along with default arguments (bitmask used for defaulting)?
    m
    udalov
    2 replies
    Copy to Clipboard
  • w

    wouterdoeland

    5 years ago
    Hi, how should I check whether a KType is equal to another KType? For example: I want to check whether a parameter in the constructor of an object is a String
    w
    1 replies
    Copy to Clipboard
  • grandstaish

    grandstaish

    5 years ago
    I'm trying to debug why Moshi doesn't work with Kotlin + ProGuard. The issue I'm seeing is that when ProGuard is enabled the call
    rawType.kotlin.primaryConstructor
    returns
    null
    . What sorts of things do I need to keep in order for kotlin-reflect to be able to find the primary constructor of a class at runtime? Just keeping the
    @Metadata
    annotation methods (as the library suggests) is not enough. Keeping all kotlin classes (
    -keep class kotlin.** { *; }
    ) does work, but I'd rather just keep what I need.
    grandstaish
    udalov
    4 replies
    Copy to Clipboard
  • j

    janvladimirmostert

    5 years ago
    I'm trying to invoke a function, but I 'm getting
    java.lang.IllegalArgumentException: Callable expects 4 arguments, but 3 were provided.
    This is the place where I'm doing the call:
    annotation.listeners.forEach { listener: KClass<*> ->
    					listener.functions.forEach { function: KFunction<*> ->
    						if (function.name == "before") {
    							function.call(annotation.action, request, response)
    						}
    					}
    				}
    And this is the method on the interface that's being called:
    interface ControllerListener {
    	fun before(action: String, request: RestRequest, response: RestResponse)
    	fun after(action: String, request: RestRequest, response: RestResponse)
    }
    What should the fourth paramater be?
    j
    ilya.gorbunov
    3 replies
    Copy to Clipboard
  • snowe

    snowe

    5 years ago
    If I have a property that I'm trying to add a modifier to it works fine, as long as there is no annotation on that property. Why is that? otherwise I get an exception
    snowe
    udalov
    3 replies
    Copy to Clipboard
  • m

    Marc Knaup

    4 years ago
    I wonder why
    .javaClass
    doesn’t use
    out
    projection 😮
    m
    udalov
    2 replies
    Copy to Clipboard
  • y

    yoavst

    4 years ago
    Can I improve this code without full reflection jar (for android)? I want to be able to pass only
    boundReference::fieldName
    y
    udalov
    2 replies
    Copy to Clipboard
  • miha-x64

    miha-x64

    4 years ago
    Any way to get actual type agruments from a reified type? E. g. in
    someInlineFunc<A<X>, A<Y>, B<X>>()
    , is there a way to say that first two type arguments are different? (Okay, I've resolved my task without it, now it's just a proof-of-concept question.)
    miha-x64
    snrostov
    6 replies
    Copy to Clipboard
  • snowe

    snowe

    4 years ago
    is there any way to declare functions programmatically with annotations on them?
    snowe
    1 replies
    Copy to Clipboard