protected static class JavacParser.SimpleEndPosTable extends JavacParser.AbstractEndPosTable
errorEndPos, parser
Modifier and Type | Method and Description |
---|---|
int |
getEndPos(JCTree tree)
This method will return the end position of a given tree, otherwise a
Positions.NOPOS will be returned.
|
int |
replaceTree(JCTree oldTree,
JCTree newTree)
Give an old tree and a new tree, the old tree will be replaced with
the new tree, the position of the new tree will be that of the old
tree.
|
void |
storeEnd(JCTree tree,
int endpos)
Store ending position for a tree, the value of which is the greater of
last error position and the given ending position.
|
protected <T extends JCTree> |
to(T t)
Store current token's ending position for a tree, the value of which
will be the greater of last error position and the ending position of
the current token.
|
protected <T extends JCTree> |
toP(T t)
Store current token's ending position for a tree, the value of which
will be the greater of last error position and the ending position of
the previous token.
|
setErrorEndPos, setParser
public void storeEnd(JCTree tree, int endpos)
EndPosTable
tree
- The tree.endpos
- The ending position to associate with the tree.protected <T extends JCTree> T to(T t)
JavacParser.AbstractEndPosTable
to
in class JavacParser.AbstractEndPosTable
t
- The tree.protected <T extends JCTree> T toP(T t)
JavacParser.AbstractEndPosTable
toP
in class JavacParser.AbstractEndPosTable
t
- The tree.public int getEndPos(JCTree tree)
EndPosTable
tree
- JCTreepublic int replaceTree(JCTree oldTree, JCTree newTree)
EndPosTable
oldTree
- a JCTree to be replacednewTree
- a JCTree to be replaced withCopyright © 2017 earcam. All rights reserved.