package Ġorg . jetbrains . fortran . lang . psi . mixin Ċ Ċ import Ġcom . intellij . lang . AST Node Ċ import Ġcom . intellij . psi . Psi Element Ċ import Ġcom . intellij . psi . stubs . I Stub ElementType Ċ import Ġcom . intellij . psi . util . Psi Tree Util Ċ import Ġorg . jetbrains . fortran . lang . stubs . For tran Program Unit Stub Ċ import Ġorg . jetbrains . fortran . lang . psi .* Ċ import Ġorg . jetbrains . fortran . lang . psi . ext . For tran Named Element Ċ import Ġorg . jetbrains . fortran . lang . psi . impl . For tran Program Unit Impl Ċ Ċ abstract Ġclass ĠFor tran Function Sub program Impl Mixin Ġ: ĠFor tran Program Unit Impl , ĠFor tran Named Element , ĠFor tran Function Sub program Ġ{ ĊĠĠĠ Ġconstructor ( node : ĠAST Node ) Ġ: Ġsuper ( node ) ĊĊĠĠĠ Ġconstructor ( stub : ĠFor tran Program Unit Stub , Ġnode Type : ĠI Stub ElementType < *, Ġ* >) Ġ: Ġsuper ( stub , Ġnode Type ) ĊĊĊĠĠĠ Ġoverride Ġfun ĠgetName Identifier (): ĠPsi Element ? Ġ= Ġfunction Stmt . entity Decl ĊĊĠĠĠ Ġoverride Ġval Ġvariables : ĠList < For tran Named Element > ĊĠĠĠĠĠĠĠ Ġget () Ġ= ĠPsi Tree Util . get Stub Children OfType As List ( block , ĠFor tran Type Declaration Stmt :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. flatMap Ġ{ ĠPsi Tree Util . get Stub Children OfType As List ( it , ĠFor tran Entity Decl :: class . java ) Ġ} ĊĊĊĠĠĠ Ġoverride Ġval Ġunit : ĠFor tran Named Element ĊĠĠĠĠĠĠĠ Ġget () Ġ= ĠPsi Tree Util . get Stub Child OfType ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠPsi Tree Util . get Stub Child OfType ( this , ĠFor tran Function Stmt :: class . java ), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠFor tran Entity Decl :: class . java ) Ġas ĠFor tran Named Element ĊĊĠĠĠ Ġoverride Ġval Ġsub programs : ĠList < For tran Named Element > ĊĠĠĠĠĠĠĠ Ġget () Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġprogram Units Ġ= ĠPsi Tree Util . get Stub Children OfType As List ( internal Sub program Part , ĠFor tran Program Unit :: class . java ) ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġreturn Ġprogram Units . map NotNull { Ġit . unit Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. plus ( program Units . filter Is Instance ( For tran Function Sub program :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. flatMap Ġ{ Ġf Ġ-> Ġf . variables . filter Ġ{ Ġf . unit ?. name . equals ( it . name , Ġtrue ) Ġ} Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠ Ġ} ĊĊĊĠĠĠ Ġoverride Ġval Ġused Modules : ĠList < For tran Data Path > ĊĠĠĠĠĠĠĠ Ġget () Ġ= ĠPsi Tree Util . get Stub Children OfType As List ( block , ĠFor tran Use Stmt :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. map NotNull { Ġit . data Path Ġ} ĊĊĠĠĠ Ġoverride Ġval Ġtypes : ĠList < For tran Named Element > ĊĠĠĠĠĠĠĠ Ġget () Ġ= ĠPsi Tree Util . get Stub Children OfType As List ( block , ĠFor tran Derived TypeDef :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. map NotNull { Ġit . derived Type Stmt . type Decl Ġ} Ċ Ċ }