scala

# Dynamic

#### trait Dynamic extends Any

A marker trait that enables dynamic invocations. Instances `x` of this trait allow method invocations `x.meth(args)` for arbitrary method names `meth` and argument lists `args` as well as field accesses `x.field` for arbitrary field names `field`.

If a call is not natively supported by `x` (i.e. if type checking fails), it is rewritten according to the following rules:

    foo.method("blah")      ~~> foo.applyDynamic("method")("blah")
    foo.method(x = "blah")  ~~> foo.applyDynamicNamed("method")(("x", "blah"))
    foo.method(x = 1, 2)    ~~> foo.applyDynamicNamed("method")(("x", 1), ("", 2))
    foo.field           ~~> foo.selectDynamic("field")
    foo.varia = 10      ~~> foo.updateDynamic("varia")(10)
    foo.arr(10) = 13    ~~> foo.selectDynamic("arr").update(10, 13)
    foo.arr(10)         ~~> foo.applyDynamic("arr")(10)

As of Scala 2.10, defining direct or indirect subclasses of this trait is only possible if the language feature `dynamics` is enabled.

Linear Supertypes
Any
Type Hierarchy Learn more about scaladoc diagrams
Ordering

1. Alphabetic
2. By inheritance

Inherited

1. Dynamic
2. Any

Implicitly

1. by any2stringadd
2. by StringFormat
3. by Ensuring
4. by ArrowAssoc

1. Hide All
2. Show all

Learn more about member selection
Visibility

1. Public
2. All

### Abstract Value Members

1. #### abstract def getClass(): Class[_]

   Definition Classes
     Any

### Concrete Value Members

1. #### final def !=(arg0: Any): Boolean

   Definition Classes
     Any

2. #### final def ##(): Int

   Definition Classes
     Any

3. #### def +(other: String): String

   Implicit information
     This member is added by an implicit conversion from Dynamic to any2stringadd[Dynamic] performed by method any2stringadd in scala.Predef.
   Definition Classes
     any2stringadd

4. #### def ->[B](y: B): (Dynamic, B)

   Implicit information
     This member is added by an implicit conversion from Dynamic to ArrowAssoc[Dynamic] performed by method ArrowAssoc in scala.Predef.
   Definition Classes
     ArrowAssoc
   Annotations
     @inline()

5. #### final def ==(arg0: Any): Boolean

   Definition Classes
     Any

6. #### final def asInstanceOf[T0]: T0

   Definition Classes
     Any

7. #### def ensuring(cond: (Dynamic) ⇒ Boolean, msg: ⇒ Any): Dynamic

   Implicit information
     This member is added by an implicit conversion from Dynamic to Ensuring[Dynamic] performed by method Ensuring in scala.Predef.
   Definition Classes
     Ensuring

8. #### def ensuring(cond: (Dynamic) ⇒ Boolean): Dynamic

   Implicit information
     This member is added by an implicit conversion from Dynamic to Ensuring[Dynamic] performed by method Ensuring in scala.Predef.
   Definition Classes
     Ensuring

9. #### def ensuring(cond: Boolean, msg: ⇒ Any): Dynamic

   Implicit information
     This member is added by an implicit conversion from Dynamic to Ensuring[Dynamic] performed by method Ensuring in scala.Predef.
   Definition Classes
     Ensuring

10. #### def ensuring(cond: Boolean): Dynamic

    Implicit information
      This member is added by an implicit conversion from Dynamic to Ensuring[Dynamic] performed by method Ensuring in scala.Predef.
    Definition Classes
      Ensuring

11. #### def equals(arg0: Any): Boolean

    Definition Classes
      Any

12. #### def formatted(fmtstr: String): String

    Returns string formatted according to given `format` string.

    Returns string formatted according to given `format` string. Format strings are as for `String.format` (@see java.lang.String.format).

    Implicit information
      This member is added by an implicit conversion from Dynamic to StringFormat[Dynamic] performed by method StringFormat in scala.Predef.
    Definition Classes
      StringFormat
    Annotations
      @inline()

13. #### def hashCode(): Int

    Definition Classes
      Any

14. #### final def isInstanceOf[T0]: Boolean

    Definition Classes
      Any

15. #### def toString(): String

    Definition Classes
      Any

16. #### def →[B](y: B): (Dynamic, B)

    Implicit information
      This member is added by an implicit conversion from Dynamic to ArrowAssoc[Dynamic] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
      ArrowAssoc

### Inherited from Any

### Inherited by implicit conversion any2stringadd from Dynamic to any2stringadd[Dynamic]

### Inherited by implicit conversion StringFormat from Dynamic to StringFormat[Dynamic]

### Inherited by implicit conversion Ensuring from Dynamic to Ensuring[Dynamic]

### Inherited by implicit conversion ArrowAssoc from Dynamic to ArrowAssoc[Dynamic]

### Ungrouped