Java Doc for Parser.java in  » 6.0-JDK-Modules-sun » javac-compiler » com » sun » tools » javac » parser » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » 6.0 JDK Modules sun » javac compiler » com.sun.tools.javac.parser 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.sun.tools.javac.parser.Parser

All known Subclasses:   com.sun.tools.javac.parser.EndPosParser,
Parser
public class Parser (Code)
The parser maps a token sequence into an abstract syntax tree. It operates by recursive descent, with code derived systematically from an LL(1) grammar. For efficiency reasons, an operator precedence scheme is used for parsing binary operation expressions.

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.


Inner Class :public static class Factory

Field Summary
final static  intEXPR
    
protected  TreeMakerF
     The factory to be used for abstract syntax tree construction.
final static  intNOPARAMS
    
final static  intTYPE
    
final static  intTYPEARG
    
 booleanallowAnnotations
    
 booleanallowAsserts
    
 booleanallowEnums
    
 booleanallowForeach
    
 booleanallowGenerics
    
 booleanallowStaticImport
    
 booleanallowVarargs
    
 Map<JCTree, String>docComments
     A hashtable to store all documentation comments indexed by the tree nodes they refer to.
 booleankeepDocComments
    
 ListBuffer<JCExpression[]>odStackSupply
     optimization: To save allocating a new operand/operator stack for every binary operation, we use supplys.
 ListBuffer<Token[]>opStackSupply
    

Constructor Summary
protected  Parser(Factory fac, Lexer S, boolean keepDocComments)
     Construct a parser from a given scanner, tree factory and log.

Method Summary
public  voidaccept(Token token)
     If next input token matches given token, skip it, otherwise report an error.
 JCAnnotationannotation(int pos)
    
 JCExpressionannotationFieldValue()
    
 List<JCExpression>annotationFieldValues()
    
 List<JCExpression>annotationFieldValuesOpt()
    
 JCExpressionannotationValue()
    
 List<JCAnnotation>annotationsOpt()
    
 List<JCExpression>arguments()
    
 JCMethodInvocationarguments(List<JCExpression> typeArgs, JCExpression t)
    
 JCExpressionargumentsOpt(List<JCExpression> typeArgs, JCExpression t)
    
 JCExpressionarrayCreatorRest(int newpos, JCExpression elemtype)
    
 JCExpressionarrayInitializer(int newpos, JCExpression t)
    
 voidattach(JCTree tree, String dc)
     Make an entry into docComments hashtable, provided flag keepDocComments is set and given doc comment is non-null.
 JCPrimitiveTypeTreebasicType()
    
 JCBlockblock(int pos, long flags)
    
public  JCBlockblock()
    
 List<JCStatement>blockStatements()
    
 JCExpressionbracketsSuffix(JCExpression t)
    
 JCCatchcatchClause()
    
 voidcheckAnnotations()
    
protected  JCExpressioncheckExprStat(JCExpression t)
     Check that given tree is a legal expression statement.
 voidcheckForeach()
    
 voidcheckGenerics()
    
 voidcheckNoMods(long mods)
     Diagnose a modifier flag from the set, if any.
 voidcheckStaticImports()
    
 voidcheckVarargs()
    
 JCExpressionclassCreatorRest(int newpos, JCExpression encl, List<JCExpression> typeArgs, JCExpression t)
    
 JCClassDeclclassDeclaration(JCModifiers mods, String dc)
    
 List<JCTree>classOrInterfaceBody(Name className, boolean isInterface)
    
 List<JCTree>classOrInterfaceBodyDeclaration(Name className, boolean isInterface)
    
 JCStatementclassOrInterfaceOrEnumDeclaration(JCModifiers mods, String dc)
    
public  JCTree.JCCompilationUnitcompilationUnit()
    
 JCExpressioncreator(int newpos, List<JCExpression> typeArgs)
    
 List<JCTree>enumBody(Name enumName)
    
 JCClassDeclenumDeclaration(JCModifiers mods, String dc)
    
 JCTreeenumeratorDeclaration(Name enumName)
    
public  JCExpressionexpression()
     terms can be either expressions or types.
protected  StringBufferfoldStrings(JCTree tree)
     If tree is a concatenation of string literals, replace it by a single literal representing the concatenated string.
 List<JCStatement>forInit()
    
 List<JCExpressionStatement>forUpdate()
    
 JCVariableDeclformalParameter()
    
 List<JCVariableDecl>formalParameters()
    
public  intgetEndPos(JCTree tree)
     Get the end position for a tree node.
protected  intgetErrorEndPos()
    
public  intgetStartPos(JCTree tree)
     Get the start position for a tree node.
 Nameident()
    
 JCExpressionillegal(int pos)
     Report an illegal start of expression/type error at given position.
 JCExpressionillegal()
     Report an illegal start of expression/type error at current position.
 JCTreeimportDeclaration()
    
 JCExpressioninnerCreator(int newpos, List<JCExpression> typeArgs, JCExpression encl)
    
 JCClassDeclinterfaceDeclaration(JCModifiers mods, String dc)
    
 booleanisZero(String s)
    
 JCExpressionliteral(Name prefix)
    
 JCTreemethodDeclaratorRest(int pos, JCModifiers mods, JCExpression type, Name name, List<JCTypeParameter> typarams, boolean isInterface, boolean isVoid, String dc)
    
 JCModifiersmodifiersOpt()
    
 JCModifiersmodifiersOpt(JCModifiers partial)
    
 TmoreStatementExpressions(int pos, JCExpression first, T stats)
    
 JCModifiersoptFinal(long flags)
    
static  intoptag(Token token)
     Return operation tag of binary operator represented by token, -1 if token is not a binary operator.
 JCExpressionparExpression()
    
static  intprec(Token token)
     Return precedence of operator represented by token, -1 if token is not a binary operator.
public  JCExpressionqualident()
    
 List<JCExpression>qualidentList()
    
public  JCStatementstatement()
    
protected  voidstoreEnd(JCTree tree, int endpos)
     Store ending position for a tree.
 Stringstrval(Name prefix)
    
 JCExpressionsuperSuffix(List<JCExpression> typeArgs, JCExpression t)
    
 List<JCCase>switchBlockStatementGroups()
    
 JCExpressionterm(int newmode)
    
 JCExpressionterm()
    
 JCExpressionterm1()
    
 JCExpressionterm1Rest(JCExpression t)
    
 JCExpressionterm2()
    
 JCExpressionterm2Rest(JCExpression t, int minprec)
    
protected  JCExpressionterm3()
    
 JCExpressiontermRest(JCExpression t)
    
protected  Tto(T t)
     Store ending position for a tree.
protected  TtoP(T t)
     Store ending position for a tree.
public  JCExpressiontype()
    
 JCExpressiontypeArgument()
    
 List<JCExpression>typeArguments()
    
 JCTypeApplytypeArguments(JCExpression t)
    
 JCExpressiontypeArgumentsOpt(JCExpression t)
    
 List<JCExpression>typeArgumentsOpt()
    
 List<JCExpression>typeArgumentsOpt(int useMode)
    
 JCTreetypeDeclaration(JCModifiers mods)
    
 List<JCExpression>typeList()
    
 JCTypeParametertypeParameter()
    
 List<JCTypeParameter>typeParametersOpt()
    
static  inttypetag(Token token)
     Return type tag of basic type represented by token, -1 if token is not a basic type identifier.
static  intunoptag(Token token)
     Return operation tag of unary operator represented by token, -1 if token is not a binary operator.
 JCVariableDeclvariableDeclarator(JCModifiers mods, JCExpression type, boolean reqInit, String dc)
    
 JCVariableDeclvariableDeclaratorId(JCModifiers mods, JCExpression type)
    
 JCVariableDeclvariableDeclaratorRest(int pos, JCModifiers mods, JCExpression type, Name name, boolean reqInit, String dc)
    
public  TvariableDeclarators(JCModifiers mods, JCExpression type, T vdefs)
    
 TvariableDeclaratorsRest(int pos, JCModifiers mods, JCExpression type, Name name, boolean reqInit, String dc, T vdefs)
    
public  JCExpressionvariableInitializer()
    

Field Detail
EXPR
final static int EXPR(Code)
When terms are parsed, the mode determines which is expected: mode = EXPR : an expression mode = TYPE : a type mode = NOPARAMS : no parameters allowed for type mode = TYPEARG : type argument



F
protected TreeMaker F(Code)
The factory to be used for abstract syntax tree construction.



NOPARAMS
final static int NOPARAMS(Code)



TYPE
final static int TYPE(Code)



TYPEARG
final static int TYPEARG(Code)



allowAnnotations
boolean allowAnnotations(Code)
Switch: should we recognize annotations?



allowAsserts
boolean allowAsserts(Code)
Switch: should we recognize assert statements, or just give a warning?



allowEnums
boolean allowEnums(Code)
Switch: should we recognize enums, or just give a warning?



allowForeach
boolean allowForeach(Code)
Switch: should we recognize foreach?



allowGenerics
boolean allowGenerics(Code)
Switch: Should generics be recognized?



allowStaticImport
boolean allowStaticImport(Code)
Switch: should we recognize foreach?



allowVarargs
boolean allowVarargs(Code)
Switch: Should varargs be recognized?



docComments
Map<JCTree, String> docComments(Code)
A hashtable to store all documentation comments indexed by the tree nodes they refer to. defined only if option flag keepDocComment is set.



keepDocComments
boolean keepDocComments(Code)
Switch: should we keep docComments?



odStackSupply
ListBuffer<JCExpression[]> odStackSupply(Code)
optimization: To save allocating a new operand/operator stack for every binary operation, we use supplys.



opStackSupply
ListBuffer<Token[]> opStackSupply(Code)




Constructor Detail
Parser
protected Parser(Factory fac, Lexer S, boolean keepDocComments)(Code)
Construct a parser from a given scanner, tree factory and log.




Method Detail
accept
public void accept(Token token)(Code)
If next input token matches given token, skip it, otherwise report an error.



annotation
JCAnnotation annotation(int pos)(Code)
Annotation = "@" Qualident [ "(" AnnotationFieldValues ")" ]
Parameters:
  pos - position of "@" token



annotationFieldValue
JCExpression annotationFieldValue()(Code)
AnnotationFieldValue = AnnotationValue | Identifier "=" AnnotationValue



annotationFieldValues
List<JCExpression> annotationFieldValues()(Code)
AnnotationFieldValues = "(" [ AnnotationFieldValue { "," AnnotationFieldValue } ] ")"



annotationFieldValuesOpt
List<JCExpression> annotationFieldValuesOpt()(Code)



annotationValue
JCExpression annotationValue()(Code)



annotationsOpt
List<JCAnnotation> annotationsOpt()(Code)
AnnotationsOpt = { '@' Annotation }



arguments
List<JCExpression> arguments()(Code)
Arguments = "(" [Expression { COMMA Expression }] ")"



arguments
JCMethodInvocation arguments(List<JCExpression> typeArgs, JCExpression t)(Code)



argumentsOpt
JCExpression argumentsOpt(List<JCExpression> typeArgs, JCExpression t)(Code)
ArgumentsOpt = [ Arguments ]



arrayCreatorRest
JCExpression arrayCreatorRest(int newpos, JCExpression elemtype)(Code)
ArrayCreatorRest = "[" ( "]" BracketsOpt ArrayInitializer | Expression "]" {"[" Expression "]"} BracketsOpt )



arrayInitializer
JCExpression arrayInitializer(int newpos, JCExpression t)(Code)
ArrayInitializer = "{" [VariableInitializer {"," VariableInitializer}] [","] "}"



attach
void attach(JCTree tree, String dc)(Code)
Make an entry into docComments hashtable, provided flag keepDocComments is set and given doc comment is non-null.
Parameters:
  tree - The tree to be used as index in the hashtable
Parameters:
  dc - The doc comment to associate with the tree, or null.



basicType
JCPrimitiveTypeTree basicType()(Code)
BasicType = BYTE | SHORT | CHAR | INT | LONG | FLOAT | DOUBLE | BOOLEAN



block
JCBlock block(int pos, long flags)(Code)
Block = "{" BlockStatements "}"



block
public JCBlock block()(Code)



blockStatements
List<JCStatement> blockStatements()(Code)
BlockStatements = { BlockStatement } BlockStatement = LocalVariableDeclarationStatement | ClassOrInterfaceOrEnumDeclaration | [Ident ":"] Statement LocalVariableDeclarationStatement = { FINAL | '@' Annotation } Type VariableDeclarators ";"



bracketsSuffix
JCExpression bracketsSuffix(JCExpression t)(Code)
BracketsSuffixExpr = "." CLASS BracketsSuffixType =



catchClause
JCCatch catchClause()(Code)
CatchClause = CATCH "(" FormalParameter ")" Block



checkAnnotations
void checkAnnotations()(Code)



checkExprStat
protected JCExpression checkExprStat(JCExpression t)(Code)
Check that given tree is a legal expression statement.



checkForeach
void checkForeach()(Code)



checkGenerics
void checkGenerics()(Code)



checkNoMods
void checkNoMods(long mods)(Code)
Diagnose a modifier flag from the set, if any.



checkStaticImports
void checkStaticImports()(Code)



checkVarargs
void checkVarargs()(Code)



classCreatorRest
JCExpression classCreatorRest(int newpos, JCExpression encl, List<JCExpression> typeArgs, JCExpression t)(Code)
ClassCreatorRest = Arguments [ClassBody]



classDeclaration
JCClassDecl classDeclaration(JCModifiers mods, String dc)(Code)
ClassDeclaration = CLASS Ident TypeParametersOpt [EXTENDS Type] [IMPLEMENTS TypeList] ClassBody
Parameters:
  mods - The modifiers starting the class declaration
Parameters:
  dc - The documentation comment for the class, or null.



classOrInterfaceBody
List<JCTree> classOrInterfaceBody(Name className, boolean isInterface)(Code)
ClassBody = "{" {ClassBodyDeclaration} "}" InterfaceBody = "{" {InterfaceBodyDeclaration} "}"



classOrInterfaceBodyDeclaration
List<JCTree> classOrInterfaceBodyDeclaration(Name className, boolean isInterface)(Code)
ClassBodyDeclaration = ";" | [STATIC] Block | ModifiersOpt ( Type Ident ( VariableDeclaratorsRest ";" | MethodDeclaratorRest ) | VOID Ident MethodDeclaratorRest | TypeParameters (Type | VOID) Ident MethodDeclaratorRest | Ident ConstructorDeclaratorRest | TypeParameters Ident ConstructorDeclaratorRest | ClassOrInterfaceOrEnumDeclaration ) InterfaceBodyDeclaration = ";" | ModifiersOpt Type Ident ( ConstantDeclaratorsRest | InterfaceMethodDeclaratorRest ";" )



classOrInterfaceOrEnumDeclaration
JCStatement classOrInterfaceOrEnumDeclaration(JCModifiers mods, String dc)(Code)
ClassOrInterfaceOrEnumDeclaration = ModifiersOpt (ClassDeclaration | InterfaceDeclaration | EnumDeclaration)
Parameters:
  mods - Any modifiers starting the class or interface declaration
Parameters:
  dc - The documentation comment for the class, or null.



compilationUnit
public JCTree.JCCompilationUnit compilationUnit()(Code)
CompilationUnit = [ { "@" Annotation } PACKAGE Qualident ";"] {ImportDeclaration} {TypeDeclaration}



creator
JCExpression creator(int newpos, List<JCExpression> typeArgs)(Code)
Creator = Qualident [TypeArguments] ( ArrayCreatorRest | ClassCreatorRest )



enumBody
List<JCTree> enumBody(Name enumName)(Code)
EnumBody = "{" { EnumeratorDeclarationList } [","] [ ";" {ClassBodyDeclaration} ] "}"



enumDeclaration
JCClassDecl enumDeclaration(JCModifiers mods, String dc)(Code)
EnumDeclaration = ENUM Ident [IMPLEMENTS TypeList] EnumBody
Parameters:
  mods - The modifiers starting the enum declaration
Parameters:
  dc - The documentation comment for the enum, or null.



enumeratorDeclaration
JCTree enumeratorDeclaration(Name enumName)(Code)
EnumeratorDeclaration = AnnotationsOpt [TypeArguments] IDENTIFIER [ Arguments ] [ "{" ClassBody "}" ]



expression
public JCExpression expression()(Code)
terms can be either expressions or types.



foldStrings
protected StringBuffer foldStrings(JCTree tree)(Code)
If tree is a concatenation of string literals, replace it by a single literal representing the concatenated string.



forInit
List<JCStatement> forInit()(Code)
ForInit = StatementExpression MoreStatementExpressions | { FINAL | '@' Annotation } Type VariableDeclarators



forUpdate
List<JCExpressionStatement> forUpdate()(Code)
ForUpdate = StatementExpression MoreStatementExpressions



formalParameter
JCVariableDecl formalParameter()(Code)
FormalParameter = { FINAL | '@' Annotation } Type VariableDeclaratorId LastFormalParameter = { FINAL | '@' Annotation } Type '...' Ident | FormalParameter



formalParameters
List<JCVariableDecl> formalParameters()(Code)
FormalParameters = "(" [ FormalParameterList ] ")" FormalParameterList = [ FormalParameterListNovarargs , ] LastFormalParameter FormalParameterListNovarargs = [ FormalParameterListNovarargs , ] FormalParameter



getEndPos
public int getEndPos(JCTree tree)(Code)
Get the end position for a tree node. The end position is defined to be the position of the last character of the last token of the node's source text. Returns Position.NOPOS if end positions are not generated or the position is otherwise not found.
Parameters:
  tree - The tree node



getErrorEndPos
protected int getErrorEndPos()(Code)



getStartPos
public int getStartPos(JCTree tree)(Code)
Get the start position for a tree node. The start position is defined to be the position of the first character of the first token of the node's source text.
Parameters:
  tree - The tree node



ident
Name ident()(Code)
Ident = IDENTIFIER



illegal
JCExpression illegal(int pos)(Code)
Report an illegal start of expression/type error at given position.



illegal
JCExpression illegal()(Code)
Report an illegal start of expression/type error at current position.



importDeclaration
JCTree importDeclaration()(Code)
ImportDeclaration = IMPORT [ STATIC ] Ident { "." Ident } [ "." "*" ] ";"



innerCreator
JCExpression innerCreator(int newpos, List<JCExpression> typeArgs, JCExpression encl)(Code)
InnerCreator = Ident [TypeArguments] ClassCreatorRest



interfaceDeclaration
JCClassDecl interfaceDeclaration(JCModifiers mods, String dc)(Code)
InterfaceDeclaration = INTERFACE Ident TypeParametersOpt [EXTENDS TypeList] InterfaceBody
Parameters:
  mods - The modifiers starting the interface declaration
Parameters:
  dc - The documentation comment for the interface, or null.



isZero
boolean isZero(String s)(Code)



literal
JCExpression literal(Name prefix)(Code)
Literal = INTLITERAL | LONGLITERAL | FLOATLITERAL | DOUBLELITERAL | CHARLITERAL | STRINGLITERAL | TRUE | FALSE | NULL



methodDeclaratorRest
JCTree methodDeclaratorRest(int pos, JCModifiers mods, JCExpression type, Name name, List<JCTypeParameter> typarams, boolean isInterface, boolean isVoid, String dc)(Code)
MethodDeclaratorRest = FormalParameters BracketsOpt [Throws TypeList] ( MethodBody | [DEFAULT AnnotationValue] ";") VoidMethodDeclaratorRest = FormalParameters [Throws TypeList] ( MethodBody | ";") InterfaceMethodDeclaratorRest = FormalParameters BracketsOpt [THROWS TypeList] ";" VoidInterfaceMethodDeclaratorRest = FormalParameters [THROWS TypeList] ";" ConstructorDeclaratorRest = "(" FormalParameterListOpt ")" [THROWS TypeList] MethodBody



modifiersOpt
JCModifiers modifiersOpt()(Code)
ModifiersOpt = { Modifier } Modifier = PUBLIC | PROTECTED | PRIVATE | STATIC | ABSTRACT | FINAL | NATIVE | SYNCHRONIZED | TRANSIENT | VOLATILE | "@" | "@" Annotation



modifiersOpt
JCModifiers modifiersOpt(JCModifiers partial)(Code)



moreStatementExpressions
T moreStatementExpressions(int pos, JCExpression first, T stats)(Code)
MoreStatementExpressions = { COMMA StatementExpression }



optFinal
JCModifiers optFinal(long flags)(Code)



optag
static int optag(Token token)(Code)
Return operation tag of binary operator represented by token, -1 if token is not a binary operator.



parExpression
JCExpression parExpression()(Code)
ParExpression = "(" Expression ")"



prec
static int prec(Token token)(Code)
Return precedence of operator represented by token, -1 if token is not a binary operator. @see TreeInfo.opPrec



qualident
public JCExpression qualident()(Code)
Qualident = Ident { DOT Ident }



qualidentList
List<JCExpression> qualidentList()(Code)
QualidentList = Qualident {"," Qualident}



statement
public JCStatement statement()(Code)
Statement = Block | IF ParExpression Statement [ELSE Statement] | FOR "(" ForInitOpt ";" [Expression] ";" ForUpdateOpt ")" Statement | FOR "(" FormalParameter : Expression ")" Statement | WHILE ParExpression Statement | DO Statement WHILE ParExpression ";" | TRY Block ( Catches | [Catches] FinallyPart ) | SWITCH ParExpression "{" SwitchBlockStatementGroups "}" | SYNCHRONIZED ParExpression Block | RETURN [Expression] ";" | THROW Expression ";" | BREAK [Ident] ";" | CONTINUE [Ident] ";" | ASSERT Expression [ ":" Expression ] ";" | ";" | ExpressionStatement | Ident ":" Statement



storeEnd
protected void storeEnd(JCTree tree, int endpos)(Code)
Store ending position for a tree.
Parameters:
  tree - The tree.
Parameters:
  endpos - The ending position to associate with the tree.



strval
String strval(Name prefix)(Code)



superSuffix
JCExpression superSuffix(List<JCExpression> typeArgs, JCExpression t)(Code)
SuperSuffix = Arguments | "." [TypeArguments] Ident [Arguments]



switchBlockStatementGroups
List<JCCase> switchBlockStatementGroups()(Code)
SwitchBlockStatementGroups = { SwitchBlockStatementGroup } SwitchBlockStatementGroup = SwitchLabel BlockStatements SwitchLabel = CASE ConstantExpression ":" | DEFAULT ":"



term
JCExpression term(int newmode)(Code)



term
JCExpression term()(Code)
Expression = Expression1 [ExpressionRest] ExpressionRest = [AssignmentOperator Expression1] AssignmentOperator = "=" | "+=" | "-=" | "*=" | "/=" | "&=" | "|=" | "^=" | "%=" | "<<=" | ">>=" | ">>>=" Type = Type1 TypeNoParams = TypeNoParams1 StatementExpression = Expression ConstantExpression = Expression



term1
JCExpression term1()(Code)
Expression1 = Expression2 [Expression1Rest] Type1 = Type2 TypeNoParams1 = TypeNoParams2



term1Rest
JCExpression term1Rest(JCExpression t)(Code)
Expression1Rest = ["?" Expression ":" Expression1]



term2
JCExpression term2()(Code)
Expression2 = Expression3 [Expression2Rest] Type2 = Type3 TypeNoParams2 = TypeNoParams3



term2Rest
JCExpression term2Rest(JCExpression t, int minprec)(Code)



term3
protected JCExpression term3()(Code)
Expression3 = PrefixOp Expression3 | "(" Expr | TypeNoParams ")" Expression3 | Primary {Selector} {PostfixOp} Primary = "(" Expression ")" | Literal | [TypeArguments] THIS [Arguments] | [TypeArguments] SUPER SuperSuffix | NEW [TypeArguments] Creator | Ident { "." Ident } [ "[" ( "]" BracketsOpt "." CLASS | Expression "]" ) | Arguments | "." ( CLASS | THIS | [TypeArguments] SUPER Arguments | NEW [TypeArguments] InnerCreator ) ] | BasicType BracketsOpt "." CLASS PrefixOp = "++" | "--" | "!" | "~" | "+" | "-" PostfixOp = "++" | "--" Type3 = Ident { "." Ident } [TypeArguments] {TypeSelector} BracketsOpt | BasicType TypeNoParams3 = Ident { "." Ident } BracketsOpt Selector = "." [TypeArguments] Ident [Arguments] | "." THIS | "." [TypeArguments] SUPER SuperSuffix | "." NEW [TypeArguments] InnerCreator | "[" Expression "]" TypeSelector = "." Ident [TypeArguments] SuperSuffix = Arguments | "." Ident [Arguments]



termRest
JCExpression termRest(JCExpression t)(Code)



to
protected T to(T t)(Code)
Store ending position for a tree. The ending position should be the ending position of the current token.
Parameters:
  t - The tree.



toP
protected T toP(T t)(Code)
Store ending position for a tree. The ending position should be greater of the ending position of the previous token and errorEndPos.
Parameters:
  t - The tree.



type
public JCExpression type()(Code)



typeArgument
JCExpression typeArgument()(Code)
TypeArgument = Type | "?" | "?" EXTENDS Type {"&" Type} | "?" SUPER Type



typeArguments
List<JCExpression> typeArguments()(Code)
TypeArguments = "<" TypeArgument {"," TypeArgument} ">"



typeArguments
JCTypeApply typeArguments(JCExpression t)(Code)



typeArgumentsOpt
JCExpression typeArgumentsOpt(JCExpression t)(Code)
TypeArgumentsOpt = [ TypeArguments ]



typeArgumentsOpt
List<JCExpression> typeArgumentsOpt()(Code)



typeArgumentsOpt
List<JCExpression> typeArgumentsOpt(int useMode)(Code)



typeDeclaration
JCTree typeDeclaration(JCModifiers mods)(Code)
TypeDeclaration = ClassOrInterfaceOrEnumDeclaration | ";"



typeList
List<JCExpression> typeList()(Code)
TypeList = Type {"," Type}



typeParameter
JCTypeParameter typeParameter()(Code)
TypeParameter = TypeVariable [TypeParameterBound] TypeParameterBound = EXTENDS Type {"&" Type} TypeVariable = Ident



typeParametersOpt
List<JCTypeParameter> typeParametersOpt()(Code)
TypeParametersOpt = ["<" TypeParameter {"," TypeParameter} ">"]



typetag
static int typetag(Token token)(Code)
Return type tag of basic type represented by token, -1 if token is not a basic type identifier.



unoptag
static int unoptag(Token token)(Code)
Return operation tag of unary operator represented by token, -1 if token is not a binary operator.



variableDeclarator
JCVariableDecl variableDeclarator(JCModifiers mods, JCExpression type, boolean reqInit, String dc)(Code)
VariableDeclarator = Ident VariableDeclaratorRest ConstantDeclarator = Ident ConstantDeclaratorRest



variableDeclaratorId
JCVariableDecl variableDeclaratorId(JCModifiers mods, JCExpression type)(Code)
VariableDeclaratorId = Ident BracketsOpt



variableDeclaratorRest
JCVariableDecl variableDeclaratorRest(int pos, JCModifiers mods, JCExpression type, Name name, boolean reqInit, String dc)(Code)
VariableDeclaratorRest = BracketsOpt ["=" VariableInitializer] ConstantDeclaratorRest = BracketsOpt "=" VariableInitializer
Parameters:
  reqInit - Is an initializer always required?
Parameters:
  dc - The documentation comment for the variable declarations, or null.



variableDeclarators
public T variableDeclarators(JCModifiers mods, JCExpression type, T vdefs)(Code)
VariableDeclarators = VariableDeclarator { "," VariableDeclarator }



variableDeclaratorsRest
T variableDeclaratorsRest(int pos, JCModifiers mods, JCExpression type, Name name, boolean reqInit, String dc, T vdefs)(Code)
VariableDeclaratorsRest = VariableDeclaratorRest { "," VariableDeclarator } ConstantDeclaratorsRest = ConstantDeclaratorRest { "," ConstantDeclarator }
Parameters:
  reqInit - Is an initializer always required?
Parameters:
  dc - The documentation comment for the variable declarations, or null.



variableInitializer
public JCExpression variableInitializer()(Code)
VariableInitializer = ArrayInitializer | Expression



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.