InstanceMethodDispatcher
class InstanceMethodDispatcher(instance: Any, methodName: String, matchNumbersLeniently: Boolean, matchClassesQualnames: Boolean, resolveAmbiguousSpecificity: Boolean) : FunctionDispatcher
Content copied to clipboard
Dynamic multiple dispatch for Any Kotlin instances by methodName.
Uses reflection to first find all members matching the expected method name, and then to call the correct method for given arguments.
See the FunctionDispatcher superclass for details on the method resolution strategy and configuration parameters.
Constructors
InstanceMethodDispatcher
Link copied to clipboard
Functions
checkParameterMatches
Link copied to clipboard
private fun checkParameterMatches(kparam: KParameter, arg: Any?, paramKtypeAppend: ArrayList<KType>): Boolean
Content copied to clipboard
nounifyFunctions
Link copied to clipboard
Properties
functions
Link copied to clipboard
matchClassesQualnames
Link copied to clipboard
matchNumbersLeniently
Link copied to clipboard
methodName
Link copied to clipboard
resolveAmbiguousSpecificity
Link copied to clipboard
Whether to try to resolve multiple ambiguous matching signatures by finding one that strictly subtypes all others. Rules for this are documented under getMostSpecificCallable. Does not add any extra steps unless needed; Increases function domain properly handled but does not decrease performance in other uses.
Sources
jvm source
Link copied to clipboard