1 /* |
1 /* |
2 * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
41 * @return position of the source tree or Positions.NOPOS for non-existent mapping |
41 * @return position of the source tree or Positions.NOPOS for non-existent mapping |
42 */ |
42 */ |
43 public int getEndPos(JCTree tree); |
43 public int getEndPos(JCTree tree); |
44 |
44 |
45 /** |
45 /** |
|
46 * Store ending position for a tree, the value of which is the greater of |
|
47 * last error position and the given ending position. |
|
48 * @param tree The tree. |
|
49 * @param endpos The ending position to associate with the tree. |
|
50 */ |
|
51 public abstract void storeEnd(JCTree tree, int endpos); |
|
52 |
|
53 /** |
46 * Give an old tree and a new tree, the old tree will be replaced with |
54 * Give an old tree and a new tree, the old tree will be replaced with |
47 * the new tree, the position of the new tree will be that of the old |
55 * the new tree, the position of the new tree will be that of the old |
48 * tree. |
56 * tree. |
49 * not exist. |
|
50 * @param oldtree a JCTree to be replaced |
57 * @param oldtree a JCTree to be replaced |
51 * @param newtree a JCTree to be replaced with |
58 * @param newtree a JCTree to be replaced with |
52 * @return position of the old tree or Positions.NOPOS for non-existent mapping |
59 * @return position of the old tree or Positions.NOPOS for non-existent mapping |
53 */ |
60 */ |
54 public int replaceTree(JCTree oldtree, JCTree newtree); |
61 public int replaceTree(JCTree oldtree, JCTree newtree); |