package Ġcom . rx http . compiler Ċ Ċ import Ġcom . squareup . jav ap o et . ClassName Ċ Ċ /** Ċ Ġ* ĠRx Java Ġ çīĪæľ¬ ç®¡çĲĨ Ċ Ġ* ĠUser : Ġl jx Ċ Ġ* ĠDate : Ġ 2 0 2 0 / 4 / 1 2 Ċ Ġ* ĠTime : Ġ 1 5 : 3 3 Ċ Ġ*/ Ċ private Ġvar Ġrx Java Version : ĠString ? Ġ= Ġnull Ċ Ċ private Ġval Ġrx Java Class List Ġ= ĠLinkedHashMap < String , ĠString >() Ċ Ċ fun Ġget ClassName ( simple Name : ĠString ): ĠClass Name Ġ= ĊĠĠĠ ĠClass Name . get ( rx Java Class List [ simple Name ], Ġsimple Name ) Ċ Ċ fun ĠgetClass Path ( simple Name : ĠString ) Ġ= Ġrx Java Class List [ simple Name ] Ġ+ Ġ".$ simple Name " Ċ Ċ fun Ġget K ClassName ( simple Name : ĠString ) Ġ= ĊĠĠĠ Ġcom . squareup . kotlin po et . ClassName ( rx Java Class List [ simple Name ] !! , Ġsimple Name ) Ċ Ċ fun Ġis Depend ence Rx Java () Ġ= Ġrx Java Version Ġ!= Ġnull ĊĊ Ċ fun Ġinit Rx Java Version ( version : ĠString ?) Ġ{ ĊĠĠĠ Ġval Ġreal Version Ġ= Ġwhen Ġ{ ĊĠĠĠĠĠĠĠ Ġversion . equals (" Rx Java 2 ", Ġtrue ) Ġ-> Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ" 2 . 0 . 0 " ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġversion . equals (" Rx Java 3 ", Ġtrue ) Ġ-> Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ" 3 . 0 . 0 " ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġelse Ġ-> Ġversion ĊĠĠĠ Ġ} Ġ?: Ġreturn ĊĠĠĠ Ġrx Java Version Ġ= Ġreal Version ĊĠĠĠ Ġif Ġ( real Version . version Compare (" 3 . 0 . 0 ") Ġ>= Ġ 0 ) Ġ{ ĊĠĠĠĠĠĠĠ Ġrx Java Class List [" Scheduler "] Ġ= Ġ" io . reactivex . rx java 3 . core " ĊĠĠĠĠĠĠĠ Ġrx Java Class List [" Observable "] Ġ= Ġ" io . reactivex . rx java 3 . core " ĊĠĠĠĠĠĠĠ Ġrx Java Class List [" Consumer "] Ġ= Ġ" io . reactivex . rx java 3 . functions " ĊĠĠĠĠĠĠĠ Ġrx Java Class List [" Schedulers "] Ġ= Ġ" io . reactivex . rx java 3 . schedul ers " ĊĠĠĠĠĠĠĠ Ġrx Java Class List [" Rx Java Plugins "] Ġ= Ġ" io . reactivex . rx java 3 . plugins " ĊĠĠĠĠĠĠĠ Ġrx Java Class List [" Observer "] Ġ= Ġ" io . reactivex . rx java 3 . core " ĊĠĠĠĠĠĠĠ Ġrx Java Class List [" Exceptions "] Ġ= Ġ" io . reactivex . rx java 3 . exceptions " ĊĠĠĠĠĠĠĠ Ġrx Java Class List [" Disposable "] Ġ= Ġ" io . reactivex . rx java 3 . dis pos ables " ĊĠĠĠĠĠĠĠ Ġrx Java Class List [" Disposable Helper "] Ġ= Ġ" io . reactivex . rx java 3 . internal . dis pos ables " ĊĠĠĠĠĠĠĠ Ġrx Java Class List [" Sp sc Array Queue "] Ġ= Ġif Ġ( real Version . version Compare (" 3 . 1 . 1 ") Ġ>= Ġ 0 ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ" io . reactivex . rx java 3 . operators " ĊĠĠĠĠĠĠĠ Ġ} Ġelse Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ" io . reactivex . rx java 3 . internal . queue " ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġrx Java Class List [" Disposable "] Ġ= Ġ" io . reactivex . rx java 3 . dis pos ables " ĊĠĠĠĠĠĠĠ Ġrx Java Class List [" Observable Source "] Ġ= Ġ" io . reactivex . rx java 3 . core " ĊĠĠĠ Ġ} Ġelse Ġ{ ĊĠĠĠĠĠĠĠ Ġrx Java Class List [" Scheduler "] Ġ= Ġ" io . reactivex " ĊĠĠĠĠĠĠĠ Ġrx Java Class List [" Observable "] Ġ= Ġ" io . reactivex " ĊĠĠĠĠĠĠĠ Ġrx Java Class List [" Consumer "] Ġ= Ġ" io . reactivex . functions " ĊĠĠĠĠĠĠĠ Ġrx Java Class List [" Schedulers "] Ġ= Ġ" io . reactivex . schedul ers " ĊĠĠĠĠĠĠĠ Ġrx Java Class List [" Rx Java Plugins "] Ġ= Ġ" io . reactivex . plugins " ĊĠĠĠĠĠĠĠ Ġrx Java Class List [" Observer "] Ġ= Ġ" io . reactivex " ĊĠĠĠĠĠĠĠ Ġrx Java Class List [" Exceptions "] Ġ= Ġ" io . reactivex . exceptions " ĊĠĠĠĠĠĠĠ Ġrx Java Class List [" Disposable "] Ġ= Ġ" io . reactivex . dis pos ables " ĊĠĠĠĠĠĠĠ Ġrx Java Class List [" Disposable Helper "] Ġ= Ġ" io . reactivex . internal . dis pos ables " ĊĠĠĠĠĠĠĠ Ġrx Java Class List [" Sp sc Array Queue "] Ġ= Ġ" io . reactivex . internal . queue " ĊĠĠĠĠĠĠĠ Ġrx Java Class List [" Disposable "] Ġ= Ġ" io . reactivex . dis pos ables " ĊĠĠĠĠĠĠĠ Ġrx Java Class List [" Observable Source "] Ġ= Ġ" io . reactivex " ĊĠĠĠ Ġ} Ċ } Ċ Ċ private Ġfun ĠString . version Compare ( version : ĠString ): ĠInt Ġ{ ĊĠĠĠ Ġval Ġversion Arr 1 Ġ= Ġsplit (".") ĊĠĠĠ Ġval Ġversion Arr 2 Ġ= Ġversion . split (".") ĊĠĠĠ Ġval Ġmin Len Ġ= Ġversion Arr 1 . size . coerce At Most ( version Arr 2 . size ) ĊĠĠĠ Ġvar Ġdiff Ġ= Ġ 0 ĊĠĠĠ Ġfor Ġ( i Ġin Ġ 0 Ġuntil Ġmin Len ) Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġv 1 Ġ= Ġversion Arr 1 [ i ] ĊĠĠĠĠĠĠĠ Ġval Ġv 2 Ġ= Ġversion Arr 2 [ i ] ĊĠĠĠĠĠĠĠ Ġdiff Ġ= Ġv 1 . length Ġ- Ġv 2 . length ĊĠĠĠĠĠĠĠ Ġif Ġ( diff Ġ== Ġ 0 ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġdiff Ġ= Ġv 1 . compareTo ( v 2 ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġif Ġ( diff Ġ!= Ġ 0 ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġbreak ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĠĠĠ Ġreturn Ġif Ġ( diff Ġ!= Ġ 0 ) Ġdiff Ġelse Ġversion Arr 1 . size Ġ- Ġversion Arr 2 . size Ċ }