Class NodePos

  • All Implemented Interfaces:
    com.ibm.wala.cast.tree.rewrite.CAstRewriter.RewriteContext<com.ibm.wala.cast.tree.rewrite.CAstBasicRewriter.NoKey>
    Direct Known Subclasses:
    ChildPos, ExtractionPos, LabelPos, RootPos

    public abstract class NodePos
    extends java.lang.Object
    implements com.ibm.wala.cast.tree.rewrite.CAstRewriter.RewriteContext<com.ibm.wala.cast.tree.rewrite.CAstBasicRewriter.NoKey>
    Representation of a node's position in a CAst entity's syntax tree. The position is stored as a zipper data structure.
    • Constructor Summary

      Constructors 
      Constructor Description
      NodePos()  
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract <A> A accept​(PosSwitch<A> ps)  
      static boolean inSubtree​(com.ibm.wala.cast.tree.CAstNode node, com.ibm.wala.cast.tree.CAstNode tree)
      Determines whether a node is inside the subtree rooted at some other node.
      com.ibm.wala.cast.tree.rewrite.CAstBasicRewriter.NoKey key()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • NodePos

        public NodePos()
    • Method Detail

      • accept

        public abstract <A> A accept​(PosSwitch<A> ps)
      • key

        public com.ibm.wala.cast.tree.rewrite.CAstBasicRewriter.NoKey key()
        Specified by:
        key in interface com.ibm.wala.cast.tree.rewrite.CAstRewriter.RewriteContext<com.ibm.wala.cast.tree.rewrite.CAstBasicRewriter.NoKey>
      • inSubtree

        public static boolean inSubtree​(com.ibm.wala.cast.tree.CAstNode node,
                                        com.ibm.wala.cast.tree.CAstNode tree)
        Determines whether a node is inside the subtree rooted at some other node.
        Parameters:
        node - the node
        tree - the subtree
        Returns:
        true if node is a descendant of tree, false otherwise