|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sun.tools.javac.parser.JavacParser
com.sun.tools.javac.parser.EndPosParser
public class EndPosParser
This class is similar to Parser except that it stores ending positions for the tree nodes.
This is NOT part of any API supported by Sun Microsystems. If you write code that depends on this, you do so at your own risk. This code and its internal interfaces are subject to change or deletion without notice.
| Field Summary | |
|---|---|
(package private) java.util.Map<JCTree,java.lang.Integer> |
endPositions
A hashtable to store ending positions of source ranges indexed by the tree nodes. |
private Lexer |
S
|
| Fields inherited from class com.sun.tools.javac.parser.JavacParser |
|---|
allowAnnotations, allowAsserts, allowEnums, allowForeach, allowGenerics, allowStaticImport, allowVarargs, docComments, EXPR, F, keepDocComments, keepLineMap, NOPARAMS, odStackSupply, opStackSupply, TYPE, TYPEARG |
| Constructor Summary | |
|---|---|
EndPosParser(ParserFactory fac,
Lexer S,
boolean keepDocComments,
boolean keepLineMap)
|
|
| Method Summary | ||
|---|---|---|
int |
getEndPos(JCTree tree)
Get the end position for a tree node. |
|
(package private) JCTree.JCExpression |
parExpression()
ParExpression = "(" Expression ")" |
|
JCTree.JCCompilationUnit |
parseCompilationUnit()
CompilationUnit = [ { "@" Annotation } PACKAGE Qualident ";"] {ImportDeclaration} {TypeDeclaration} |
|
protected void |
storeEnd(JCTree tree,
int endpos)
Store ending position for a tree. |
|
protected
|
to(T t)
Store ending position for a tree. |
|
protected
|
toP(T t)
Store ending position for a tree. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private Lexer S
java.util.Map<JCTree,java.lang.Integer> endPositions
| Constructor Detail |
|---|
public EndPosParser(ParserFactory fac,
Lexer S,
boolean keepDocComments,
boolean keepLineMap)
| Method Detail |
|---|
protected void storeEnd(JCTree tree,
int endpos)
storeEnd in class JavacParsertree - The tree.endpos - The ending position to associate with the tree.protected <T extends JCTree> T to(T t)
to in class JavacParsert - The tree.protected <T extends JCTree> T toP(T t)
toP in class JavacParsert - The tree.public JCTree.JCCompilationUnit parseCompilationUnit()
JavacParser
parseCompilationUnit in interface ParserparseCompilationUnit in class JavacParserJCTree.JCExpression parExpression()
parExpression in class JavacParserpublic int getEndPos(JCTree tree)
getEndPos in class JavacParsertree - The tree node
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||