Class AstUtil


  • public class AstUtil
    extends java.lang.Object
    • Constructor Detail

      • AstUtil

        public AstUtil()
    • Method Detail

      • getChildrenCount

        public static int getChildrenCount​(AST parent)
      • getChildAt

        public static AST getChildAt​(AST parent,
                                     int index)
      • getChildren

        public static java.util.List<AST> getChildren​(AST parent)
      • getChildrenBut

        public static java.util.List<AST> getChildrenBut​(AST parent,
                                                         int type)
      • getChildren

        public static java.util.List<AST> getChildren​(AST parent,
                                                      int... types)
      • hasAtMostNChildrenOfTypes

        public static boolean hasAtMostNChildrenOfTypes​(int n,
                                                        AST parent,
                                                        int... types)
        Parameters:
        n -
        parent -
        type -
        Returns:
      • getChild

        public static AST getChild​(AST parent,
                                   int type)
      • getFirstConcreteChild

        public static AST getFirstConcreteChild​(AST parent)
      • getParentType

        public static int getParentType​(AST child)