Tue, 25 Sep 2012 13:11:05 -0700
7196464: upgrade JavaCompiler.shouldStopPolicy to accomodate policies in face of error and no error
Reviewed-by: mcimadamore
ksrini@1138 | 1 | /* |
jjg@1280 | 2 | * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. |
ksrini@1138 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
ksrini@1138 | 4 | * |
ksrini@1138 | 5 | * This code is free software; you can redistribute it and/or modify it |
ksrini@1138 | 6 | * under the terms of the GNU General Public License version 2 only, as |
ksrini@1138 | 7 | * published by the Free Software Foundation. Oracle designates this |
ksrini@1138 | 8 | * particular file as subject to the "Classpath" exception as provided |
ksrini@1138 | 9 | * by Oracle in the LICENSE file that accompanied this code. |
ksrini@1138 | 10 | * |
ksrini@1138 | 11 | * This code is distributed in the hope that it will be useful, but WITHOUT |
ksrini@1138 | 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
ksrini@1138 | 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
ksrini@1138 | 14 | * version 2 for more details (a copy is included in the LICENSE file that |
ksrini@1138 | 15 | * accompanied this code). |
ksrini@1138 | 16 | * |
ksrini@1138 | 17 | * You should have received a copy of the GNU General Public License version |
ksrini@1138 | 18 | * 2 along with this work; if not, write to the Free Software Foundation, |
ksrini@1138 | 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
ksrini@1138 | 20 | * |
ksrini@1138 | 21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
ksrini@1138 | 22 | * or visit www.oracle.com if you need additional information or have any |
ksrini@1138 | 23 | * questions. |
ksrini@1138 | 24 | */ |
ksrini@1138 | 25 | |
jjg@1280 | 26 | package com.sun.tools.javac.tree; |
ksrini@1138 | 27 | |
ksrini@1138 | 28 | /** |
ksrini@1138 | 29 | * Specifies the methods to access a mappings of syntax trees to end positions. |
ksrini@1138 | 30 | * <p><b>This is NOT part of any supported API. |
ksrini@1138 | 31 | * If you write code that depends on this, you do so at your own |
ksrini@1138 | 32 | * risk. This code and its internal interfaces are subject to change |
ksrini@1138 | 33 | * or deletion without notice.</b></p> |
ksrini@1138 | 34 | */ |
ksrini@1138 | 35 | public interface EndPosTable { |
ksrini@1138 | 36 | |
ksrini@1138 | 37 | /** |
ksrini@1138 | 38 | * This method will return the end position of a given tree, otherwise a |
ksrini@1138 | 39 | * Positions.NOPOS will be returned. |
ksrini@1138 | 40 | * @param tree JCTree |
ksrini@1138 | 41 | * @return position of the source tree or Positions.NOPOS for non-existent mapping |
ksrini@1138 | 42 | */ |
ksrini@1138 | 43 | public int getEndPos(JCTree tree); |
ksrini@1138 | 44 | |
ksrini@1138 | 45 | /** |
ksrini@1138 | 46 | * Give an old tree and a new tree, the old tree will be replaced with |
ksrini@1138 | 47 | * the new tree, the position of the new tree will be that of the old |
ksrini@1138 | 48 | * tree. |
ksrini@1138 | 49 | * not exist. |
ksrini@1138 | 50 | * @param oldtree a JCTree to be replaced |
ksrini@1138 | 51 | * @param newtree a JCTree to be replaced with |
ksrini@1138 | 52 | * @return position of the old tree or Positions.NOPOS for non-existent mapping |
ksrini@1138 | 53 | */ |
ksrini@1138 | 54 | public int replaceTree(JCTree oldtree, JCTree newtree); |
ksrini@1138 | 55 | } |