public Iterable < ? extends WindupVertexFrame > findVariable ( String name , int maxDepth ) { int currentDepth = 0 ; Iterable < ? extends WindupVertexFrame > result = null ; for ( Map < String , Iterable < ? extends WindupVertexFrame > > frame : deque ) { result = frame . get ( name ) ; if ( result != null ) { break ; } currentDepth ++ ; if ( currentDepth >= maxDepth ) break ; } return result ; }
Searches the variables layers top to bottom for given name and returns if found ; null otherwise .