Message-ID: <1113900863.3413.1418978600951.JavaMail.firstname.lastname@example.org> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_3412_1869643281.1418978600951" ------=_Part_3412_1869643281.1418978600951 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
Last metaprogramming feature we'll cover today: runtime mixins. = @Mixin allowed you to mixin new behavior to classes you owned and were desi= gning. But you could not mixin anything to types you didn't own. Runtime mi= xins propose to fill that gap by letting you add a mixin on any type at run= time. If we think again about our example of vehicles with some mixed-in ca= pabilities, if we didn't own James Bond's vehicle and give it some= diving ability, we could use this mechanism:=20 =20
One or more mixins can be passed as argument to the static mixin() metho= d added by Groovy on Class.