javaMethodName¶
context(session: KaSession)
val KaFunctionSymbol.javaMethodName: String?
The visible Java method name for the given KaFunctionSymbol. The behavior is unspecified for modules other than the JVM.
The endpoint supports:
-
Mangling due to
KaSymbolVisibility.INTERNALmodifier
The name is null when the symbol has no method that can be referenced from Java:
-
KaConstructorSymbol: constructors are neither renamed byJvmNamenor mangled, so there is no name to compute -
KaSamConstructorSymbolandKaAnonymousFunctionSymbol: there is no addressable JVM method -
KaSymbolLocation.LOCALdeclarations: their JVM names are invented during lowering and cannot be reconstructed from a symbol -
Property accessors of a property without a name, of a
constproperty, or of a property with aJvmFieldbacking field, as no accessor method is generated in these cases -
The computed name is not a valid Java identifier, such as for an escaped Kotlin name like
a b c, as such a method cannot be referenced from Java code -
The name is mangled because of value classes: the suffix is either a hash of the signature, as in
classFunInParameter-5lyY9Q4, orimplfor a member of a value class, as infunWithoutParameters-impl, and the endpoint computes neither