String[dot]from meaning

Hello, I’ve seen this on Jitsi-ice4j github repo. The code goes like this:

class HarvestConfig {
    val useLinkLocalAddresses: Boolean by config {
        "org.ice4j.ice.harvest.DISABLE_LINK_LOCAL_ADDRESSES".from(configSource)
            .transformedBy { !it }
        "ice4j.harvest.use-link-local-addresses".from(configSource)
    }
}

What is the meaning of "org.ice4j.ice.harvest.DISABLE_LINK_LOCAL_ADDRESSES".from() I couldn’t find an answer.
The code can be found here: ice4j/HarvestConfig.kt at master · jitsi/ice4j · GitHub
I am not looking for what does the code piece do. I am looking for the meaning of “from”.

from is an extension function declared on String receiver, e.g.
fun String.from(source: ConfigSource) { ... }

It may be declared as a top level extension function in a library you use, or as a member extension in some class. In this example it’s likely that it comes from the latter: a class which is brought in the scope of the lambda function passed to config { }.

2 Likes

Which is declared here.