package Ġio . sell ma ir . k omp ass . compiler . destination . tree Ċ Ċ import Ġcom . squareup . kotlin po et . File Spec Ċ import Ġcom . squareup . kotlin po et . Fun Spec Ċ import Ġcom . squareup . kotlin po et . Type Spec Ċ import Ġio . sell ma ir . k omp ass . compiler . common . Render Tree Ċ import Ġio . sell ma ir . k omp ass . compiler . destination . Destination Element Ċ Ċ /* Ċ Example Ġthoughts Ġon Ġa Ġelement Ġcalled ĠLogin Destination Ċ What Ġshould Ġbe Ġgenerated Ċ 1 . ĠWe Ġneed Ġa Ġfunction ĠK omp ass . login Destination As Bundle () Ċ 2 . ĠWe Ġneed Ġa Ġfunction ĠK omp ass . bundle As Login Destination () Ċ 3 . ĠWe Ġwant Ġa Ġfunction ĠLogin Destination . as Bundle () Ċ 4 . ĠWe Ġwant Ġa Ġfunction ĠBundle ?. as Login Destination () Ċ 5 . ĠWe Ġwant Ġa Ġfunction ĠBundle ?. try As Login Destination () Ċ 6 . ĠWe Ġneed Ġa Ġclass ĠAuto Cr ane Ġ( which Ġutil izes Ġour Ġextension Ġfunctions ) Ċ 7 . ĠWe Ġwant Ġa Ġfunction ĠK omp ass Builder . auto Cr ane () Ċ Ċ Connections Ġbetween Ġthose Ġthings : Ċ Ċ K omp ass . login Destination As Bundle () Ġcan Ġjust Ġbe Ġcreated . Ċ K omp ass . bundle To Login Destination () Ġcan Ġjust Ġbe Ġcreated . Ċ Ċ Login Destination . as Bundle () Ġ!!! Ġneeds Ġto Ġknow ĠK omp ass . login Destination As Bundle Ġ!!! Ċ Bundle ?. ( try ) As Login Destination () Ġ!!! Ġneeds Ġto Ġknow ĠK omp ass . bundle As Login Destination Ġ!!! Ċ Ċ Auto Cr ane Ġ!!! Ġneeds Ġto Ġknow Ġextension Ġfunctions Ġ!!! Ċ Ċ K omp ass Builder . auto Cr ane () Ġ!!! Ġneeds Ġto Ġknow ĠAuto Cr ane Ġ!!! ĊĊ Ġ*/ ĊĊ Ċ internal Ġinterface ĠDest inations Render Tree Ġ: ĠRender Tree Ġ{ ĊĠĠĠ Ġval Ġdest inations : ĠList < Destination Render Tree > ĊĠĠĠ Ġval Ġauto Cr ane : ĠAuto Cr ane Render Tree ĊĠĠĠ Ġval Ġauto Map : ĠAuto Map Render Tree ĊĠĠĠ Ġval Ġkomp ass Builder Extensions : ĠK omp ass Builder Extensions Render Tree ĊĊĠĠĠ Ġcompanion Ġobject Ċ } Ċ Ċ interface ĠAuto Cr ane Render Tree Ġ: ĠRender Tree Ġ{ ĊĠĠĠ Ġval Ġfile : ĠFile Spec . Builder ĊĠĠĠ Ġval Ġtype : ĠType Spec . Builder ĊĠĠĠ Ġval Ġget : ĠFun Spec . Builder Ċ } Ċ Ċ interface ĠAuto Map Render Tree Ġ: ĠRender Tree Ġ{ ĊĠĠĠ Ġval Ġfile : ĠFile Spec . Builder ĊĠĠĠ Ġval Ġtype : ĠType Spec . Builder ĊĠĠĠ Ġval Ġget : ĠFun Spec . Builder Ċ } Ċ Ċ internal Ġinterface ĠDestination Render Tree Ġ: ĠRender Tree Ġ{ ĊĠĠĠ Ġval Ġelement : ĠDestination Element ĊĠĠĠ Ġval Ġextensions : ĠExtension Render Tree Ċ } ĊĊ Ċ interface ĠExtension Render Tree Ġ: ĠRender Tree Ġ{ ĊĠĠĠ Ġval Ġfile : ĠFile Spec . Builder ĊĠĠĠ Ġval Ġkomp ass Companion Extensions : ĠK omp ass Companion Extension Render Tree ĊĠĠĠ Ġval Ġbundle Extensions : ĠBundle Extensions Render Tree ĊĠĠĠ Ġval Ġdestination Extensions : ĠDestination Extensions Render Tree Ċ Ċ } Ċ Ċ interface ĠK omp ass Companion Extension Render Tree Ġ: ĠRender Tree Ġ{ ĊĠĠĠ Ġval Ġdestination As Bundle : ĠFun Spec . Builder ĊĠĠĠ Ġval Ġbundle As Destination : ĠFun Spec . Builder Ċ } Ċ Ċ interface ĠBundle Extensions Render Tree Ġ: ĠRender Tree Ġ{ ĊĠĠĠ Ġval Ġas Destination : ĠFun Spec . Builder ĊĠĠĠ Ġval Ġtry As Destination : ĠFun Spec . Builder Ċ } Ċ Ċ interface ĠDestination Extensions Render Tree Ġ: ĠRender Tree Ġ{ ĊĠĠĠ Ġval Ġas Bundle : ĠFun Spec . Builder Ċ } Ċ Ċ interface ĠK omp ass Builder Extensions Render Tree Ġ: ĠRender Tree Ġ{ ĊĠĠĠ Ġval Ġfile : ĠFile Spec . Builder ĊĠĠĠ Ġval Ġauto Cr ane : ĠFun Spec . Builder ĊĠĠĠ Ġval Ġauto Map : ĠFun Spec . Builder Ċ } Ċ