TreeScanner.java revision 3170:dc017a37aac5
1214501Srpaulo/* 2214501Srpaulo * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. 3214501Srpaulo * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4214501Srpaulo * 5252726Srpaulo * This code is free software; you can redistribute it and/or modify it 6252726Srpaulo * under the terms of the GNU General Public License version 2 only, as 7214501Srpaulo * published by the Free Software Foundation. 8214501Srpaulo * 9214501Srpaulo * This code is distributed in the hope that it will be useful, but WITHOUT 10214501Srpaulo * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11214501Srpaulo * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12214501Srpaulo * version 2 for more details (a copy is included in the LICENSE file that 13214501Srpaulo * accompanied this code). 14252726Srpaulo * 15214501Srpaulo * You should have received a copy of the GNU General Public License version 16214501Srpaulo * 2 along with this work; if not, write to the Free Software Foundation, 17214501Srpaulo * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18214501Srpaulo * 19214501Srpaulo * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20214501Srpaulo * or visit www.oracle.com if you need additional information or have any 21214501Srpaulo * questions. 22214501Srpaulo */ 23214501Srpaulo 24214501Srpaulopackage p; 25252726Srpauloimport p.Tree.*; 26214501Srpaulo 27214501Srpaulopublic class TreeScanner<E extends Throwable> extends Visitor<E> { 28214501Srpaulo 29214501Srpaulo /** Visitor method: Scan a single node. 30214501Srpaulo */ 31214501Srpaulo public void scan(Tree tree) throws E { 32214501Srpaulo if(tree!=null) tree.accept(this); 33214501Srpaulo } 34214501Srpaulo} 35214501Srpaulo