package Ġcom . episode 6 . mock sp ress o 2 . plugins . d agger 2 Ċ Ċ import Ġcom . episode 6 . mock sp ress o 2 . Mock sp ress o Builder Ċ import Ġcom . episode 6 . mock sp ress o 2 . plugins . javax . inject . reflect . find Exactly One Inject Constructor Ċ import Ġcom . episode 6 . mock sp ress o 2 . plugins . javax . inject . reflect . javax Real Object Maker Ċ import Ġdagger . ass isted . Ass isted Inject Ċ import Ġjavax . inject . Inject Ċ import Ġkotlin . reflect . full . has Annotation Ċ Ċ /** Ċ Ġ* ĠMake Ġreal Ġobjects Ġusing Ġreflection Ġaccording Ġto Ġdagger Ġrules . ĠSupports Ġconstructor , Ġproperty , Ġfield Ġand Ċ Ġ* Ġmethod Ġinjection . ĠThis Ġis Ġthe Ġsame Ġas Ġjavax . inject Ġrules Ġexcept Ġwe Ġalso Ġaccept Ġthe Ġ[ Ass isted Inject ] Ġas Ġa Ċ Ġ* Ġvalid Ġconstructor Ġannotation . Ċ Ġ*/ Ċ fun ĠMock sp ress o Builder . make Real Objects Using D agger 2 Rules (): ĠMock sp ress o Builder Ġ= Ġmake Real Objects With ( ĊĠ Ġjavax Real Object Maker Ġ{ Ġfind Exactly One Inject Constructor Ġ{ Ġhas Annotation < Inject >() Ġ|| Ġhas Annotation < Ass isted Inject >() Ġ} Ġ} Ċ ) Ċ Ċ /** Ċ Ġ* ĠEnable Ġautomatic Ġmapping Ġof Ġ[ d agger . Lazy ] s Ġto Ġtheir Ġunderlying Ġdependencies . Ċ Ġ*/ Ċ fun ĠMock sp ress o Builder . d agger 2 Lazy Support (): ĠMock sp ress o Builder Ġ= Ġadd Dynamic Object Maker ( d agger 2 Lazy Maker ()) Ċ