blob: a8b1e9cab85219f7445b24c90ba468f20682b1ae (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
package scala
/** A trait that supports dynamic invocations. Instances `x` of this trait
* allow calls `x.meth(args)` for arbitrary method names `meth` and argument lists
* `args`. If a call is not natively supported by `x`, it is rewritten to
* `x.invokeDynamic("meth", args)`.
*/
trait Dynamic {
/** The dynamic invocation operation
* @param name The name of the invoked method
* @param args The arguments to the method
*/
def applyDynamic(name: String)(args: Any*): Any
/** Returns the underlying value typed as an instance of type T
* @param T The target type
*/
def typed[T]: T
}
|