KotlinContext
class KotlinContext(variables: HashMap<String, KotlinVariableInfo> = HashMap(), functions: HashMap<String, KotlinFunctionInfo> = HashMap())
Kotlin REPL has built-in context for getting user-declared functions and variables and setting invokeWrapper for additional side effects in evaluation. It can be accessed inside REPL by name kc
, e.g. kc.showVars()
Constructors
Link copied to clipboard
constructor(variables: HashMap<String, KotlinVariableInfo> = HashMap(), functions: HashMap<String, KotlinFunctionInfo> = HashMap())