* end position of given tree, if it is a block with
* defined endpos.
*/
public static DiagnosticPosition diagEndPos(final JCTree tree) {
final int endPos = TreeInfo.endPos(tree);
return new DiagnosticPosition() {
public JCTree getTree() { return tree; }
public int getStartPosition() { return TreeInfo.getStartPos(tree); }
public int getPreferredPosition() { return endPos; }
public int getEndPosition(Map<JCTree, Integer> endPosTable) {
return TreeInfo.getEndPos(tree, endPosTable);