553N/A * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. 488N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 488N/A * This code is free software; you can redistribute it and/or modify it 488N/A * under the terms of the GNU General Public License version 2 only, as 488N/A * published by the Free Software Foundation. 488N/A * This code is distributed in the hope that it will be useful, but WITHOUT 488N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 488N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 488N/A * version 2 for more details (a copy is included in the LICENSE file that 488N/A * accompanied this code). 488N/A * You should have received a copy of the GNU General Public License version 488N/A * 2 along with this work; if not, write to the Free Software Foundation, 488N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 553N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 553N/A * or visit www.oracle.com if you need additional information or have any 488N/A * Utility and test program to check javac's internal TreeScanner class. 488N/A * The program can be run standalone, or as a jtreg test. For info on 488N/A * command line args, run program with no args. 488N/A * jtreg: Note that by using the -r switch in the test description below, this test 488N/A * covering any new language features that may be tested in this test suite. 488N/A * @summary TreeScanner.visitNewClass should scan tree.typeargs 678N/A * @build AbstractTreeScannerTest SourceTreeScannerTest 678N/A * @run main SourceTreeScannerTest -q -r . 488N/A * If test.src is set, program runs in jtreg mode, and will throw an Error 488N/A * if any errors arise, otherwise System.exit will be used. In jtreg mode, 488N/A * the default base directory for file args is the value of ${test.src}. 488N/A * In jtreg mode, the -r option can be given to change the default base 488N/A * directory to the root test directory. 488N/A * Main class for testing operation of tree scanner. 488N/A * The set of nodes found by the scanner are compared 488N/A * against the set of nodes found by reflection. 488N/A /** Main entry method for the class. */ 682N/A //System.err.println(sourcefile.getName() + ": trees compared OK"); 488N/A /** Record all tree nodes found by scanner. */ 682N/A //System.err.println("FOUND: " + tree.getKind() + " " + trim(tree, 64)); 488N/A /** record all tree nodes found by reflection. */ 682N/A //System.err.println("EXPECT: " + tree.getKind() + " " + trim(tree, 64)); 678N/A // not part of public API 678N/A // these fields are incorrectly missing from the public API 488N/A //System.err.println("FIELD: " + f.getName());