Class ParentMap


  • public class ParentMap
    extends Object
    A mapping of child to parent for every child tree in a CompilationUnitTree. The tree node in the Java AST does not maintain a reference to its parent, hence the need for this mapping.
    • Constructor Detail

      • ParentMap

        public ParentMap​(Supplier<com.sun.source.tree.CompilationUnitTree> compilationUnitSupplier)
    • Method Detail

      • getParent

        public com.sun.source.tree.Tree getParent​(com.sun.source.tree.Tree child)
      • getParent

        public com.sun.source.tree.Tree getParent​(com.sun.source.tree.Tree child,
                                                  com.sun.source.tree.CompilationUnitTree compilationUnitTree)