Class AstUtil


  • public class AstUtil
    extends 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 List<AST> getChildren​(AST parent)
      • getChildrenBut

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

        public static 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)