// ĠCopyright Ġ 2 0 0 0 - 2 0 1 8 ĠJetBrains Ġs . r . o . ĠUse Ġof Ġthis Ġsource Ġcode Ġis Ġgoverned Ġby Ġthe ĠApache Ġ 2 . 0 Ġlicense Ġthat Ġcan Ġbe Ġfound Ġin Ġthe ĠLICENSE Ġfile . Ċ package Ġorg . jetbrains . plugins . groovy . lang . resolve Ċ Ċ import Ġcom . intellij . psi .* Ċ import Ġcom . intellij . psi . scope . Psi Scope Processor Ċ import Ġorg . jetbrains . plugins . groovy . lang . psi . impl . Gr Trait Type Ċ import Ġorg . jetbrains . plugins . groovy . lang . psi . impl . Gro ovy Psi Manager Ċ import Ġorg . jetbrains . plugins . groovy . lang . resolve . Resolve Util . process Class Declarations Ċ import Ġorg . jetbrains . plugins . groovy . lang . resolve . Resolve Util . process Non Code Members Ċ Ċ fun ĠPsi Type ?. process Receiver Type ( processor : ĠPsi Scope Processor , Ġstate : ĠResolve State , Ġplace : ĠPsi Element ): ĠBoolean Ġ{ ĊĠ Ġif Ġ( this Ġ== Ġnull ) Ġreturn Ġtrue ĊĠ Ġif Ġ(! do Process Receiver Type ( processor , Ġstate , Ġplace )) Ġreturn Ġfalse ĊĠ Ġreturn Ġ! state . process Non Code Members () Ġ|| Ġprocess Non Code Members ( this , Ġprocessor , Ġplace , Ġstate ) Ċ } Ċ Ċ private Ġfun ĠPsi Type . do Process Receiver Type ( processor : ĠPsi Scope Processor , Ġstate : ĠResolve State , Ġplace : ĠPsi Element ): ĠBoolean Ġ{ ĊĠ Ġreturn Ġwhen Ġ( this ) Ġ{ ĊĠĠĠ Ġis ĠPsi Primitive Type Ġ-> Ġget Boxed Type ( place )?. process Receiver Type ( processor , Ġstate , Ġplace ) Ġ?: Ġtrue ĊĠĠĠ Ġis ĠPsi Dis junction Type Ġ-> Ġleast Upper Bound . process Receiver Type ( processor , Ġstate , Ġplace ) ĊĠĠĠ Ġis ĠPsi Intersection Type Ġ-> Ġconj unct s . all Ġ{ Ġit . process Receiver Type ( processor , Ġstate , Ġplace ) Ġ} ĊĠĠĠ Ġis ĠPsi Capt ured Wildcard Type Ġ-> Ġwildcard . process Receiver Type ( processor , Ġstate , Ġplace ) ĊĠĠĠ Ġis ĠPsi Wildcard Type Ġ-> Ġ! is Ext ends Ġ|| Ġextends Bound . process Receiver Type ( processor , Ġstate , Ġplace ) ĊĠĠĠ Ġis ĠGr Trait Type Ġ-> Ġconj unct s . reversed (). all Ġ{ ĊĠĠĠĠĠ Ġ// ĠProcess Ġtrait Ġtype Ġconj unct s Ġin Ġreversed Ġorder Ġbecause Ġlast Ġapplied Ġtrait Ġmatters ĊĠĠĠĠĠ Ġit . process Receiver Type ( processor , Ġstate , Ġplace ) ĊĠĠĠ Ġ} ĊĠĠĠ Ġis ĠPsi ArrayType Ġ-> Ġ{ ĊĠĠĠĠĠ Ġval Ġarray Class Ġ= ĠGro ovy Psi Manager . getInstance ( place . project ). get Array Class ( component Type ) Ġ?: Ġreturn Ġtrue ĊĠĠĠĠĠ Ġprocess Class Declarations ( array Class , Ġprocessor , Ġstate , Ġnull , Ġplace ) ĊĠĠĠ Ġ} ĊĠĠĠ Ġis ĠPsi ClassType Ġ-> Ġprocess ClassType ( processor , Ġstate , Ġplace ) ĊĠĠĠ Ġelse Ġ-> Ġreturn Ġtrue ĊĠ Ġ} Ċ } Ċ Ċ private Ġfun ĠPsi ClassType . process ClassType ( processor : ĠPsi Scope Processor , Ġstate : ĠResolve State , Ġplace : ĠPsi Element ): ĠBoolean Ġ{ ĊĠ Ġval Ġresult Ġ= Ġresolve Gener ics () ĊĠ Ġval Ġclazz Ġ= Ġresult . element Ġ?: Ġreturn Ġtrue ĊĠ Ġval Ġsubstit utor Ġ= Ġstate [ Psi Subst it utor . KEY ]. put All ( result . subst it utor ) ĊĠ Ġreturn Ġprocess Class Declarations ( clazz , Ġprocessor , Ġstate . put ( Psi Subst it utor . KEY , Ġsubstit utor ), Ġnull , Ġplace ) Ċ } Ċ