Package 

Class PathFinder


  • 
    public class PathFinder
    
                        

    Paths in the view hierarchy, and the machinery for finding views using them. An individual pathfinder is NOT THREAD SAFE, and should only be used by one thread at a time.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      public class PathFinder.PathElement

      a path element E matches a view V if each non "prefix" or "index"attribute of E is equal to (or characteristic of) V.SoE.viewClassName == 'com.temp.Awesome' =) V instanceof com.tempAwesomeE.id == 123 =) V.getId() == 123The index attribute, counting from root to leaf,and first child to last child, selects a particularmatching view amongst all possible matches. Indexing starts at zero, like an arrayindex. So E.index == 2 means "Select the third possible match for this element"The prefix attribute refers to the position of the matched views in the hierarchy,relative to the current position of the path being searched. The "current position" ofa path element is determined by the path that preceeded that element:- The current position of the empty path is the root view- The current position of a non-empty path isthe children of any element that matched the lastelement of that path.Prefix values can be:ZERO_LENGTH_PREFIX- the next match must occur at the current position (so at the rootview if this is the first element of a path, or at the matching children of the viewsalready matched by the preceeding portion of the path.)If a path element with ZERO_LENGTH_PREFIXhas no index, then *all* matching elements of the path will be matched, otherwise indeceswill count from first child to last child.SHORTEST_PREFIX- the next match must occur at some descendant of the current position.SHORTEST_PREFIX elements are indexed depth-first, first child to last child. For performancereasons, at most one element will ever be matched to a SHORTEST_PREFIX element, soelements with no index will be treated as having index == 0

      public interface PathFinder.Accumulator

      Accumulator.

    • Constructor Summary

      Constructors 
      Constructor Description
      PathFinder()