| 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 | |
Constructor Summary | |
protected | Parser(Factory fac, Lexer S, boolean keepDocComments) Construct a parser from a given scanner, tree factory and log. |
Method Summary | |
public void | accept(Token token) If next input token matches given token, skip it, otherwise report
an error. | JCAnnotation | annotation(int pos) | JCExpression | annotationFieldValue() | List<JCExpression> | annotationFieldValues() | List<JCExpression> | annotationFieldValuesOpt() | JCExpression | annotationValue() | List<JCAnnotation> | annotationsOpt() | List<JCExpression> | arguments() | JCMethodInvocation | arguments(List<JCExpression> typeArgs, JCExpression t) | JCExpression | argumentsOpt(List<JCExpression> typeArgs, JCExpression t) | JCExpression | arrayCreatorRest(int newpos, JCExpression elemtype) | JCExpression | arrayInitializer(int newpos, JCExpression t) | void | attach(JCTree tree, String dc) Make an entry into docComments hashtable,
provided flag keepDocComments is set and given doc comment is non-null. | JCPrimitiveTypeTree | basicType() | JCBlock | block(int pos, long flags) | public JCBlock | block() | List<JCStatement> | blockStatements() | JCExpression | bracketsSuffix(JCExpression t) | JCCatch | catchClause() | void | checkAnnotations() | protected JCExpression | checkExprStat(JCExpression t) Check that given tree is a legal expression statement. | void | checkForeach() | void | checkGenerics() | void | checkNoMods(long mods) Diagnose a modifier flag from the set, if any. | void | checkStaticImports() | void | checkVarargs() | JCExpression | classCreatorRest(int newpos, JCExpression encl, List<JCExpression> typeArgs, JCExpression t) | JCClassDecl | classDeclaration(JCModifiers mods, String dc) | List<JCTree> | classOrInterfaceBody(Name className, boolean isInterface) | List<JCTree> | classOrInterfaceBodyDeclaration(Name className, boolean isInterface) | JCStatement | classOrInterfaceOrEnumDeclaration(JCModifiers mods, String dc) | public JCTree.JCCompilationUnit | compilationUnit() | JCExpression | creator(int newpos, List<JCExpression> typeArgs) | List<JCTree> | enumBody(Name enumName) | JCClassDecl | enumDeclaration(JCModifiers mods, String dc) | JCTree | enumeratorDeclaration(Name enumName) | public JCExpression | expression() terms can be either expressions or types. | protected StringBuffer | foldStrings(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() | JCVariableDecl | formalParameter() | List<JCVariableDecl> | formalParameters() | public int | getEndPos(JCTree tree) Get the end position for a tree node. | protected int | getErrorEndPos() | public int | getStartPos(JCTree tree) Get the start position for a tree node. | Name | ident() | JCExpression | illegal(int pos) Report an illegal start of expression/type error at given position. | JCExpression | illegal() Report an illegal start of expression/type error at current position. | JCTree | importDeclaration() | JCExpression | innerCreator(int newpos, List<JCExpression> typeArgs, JCExpression encl) | JCClassDecl | interfaceDeclaration(JCModifiers mods, String dc) | boolean | isZero(String s) | JCExpression | literal(Name prefix) | JCTree | methodDeclaratorRest(int pos, JCModifiers mods, JCExpression type, Name name, List<JCTypeParameter> typarams, boolean isInterface, boolean isVoid, String dc) | JCModifiers | modifiersOpt() | JCModifiers | modifiersOpt(JCModifiers partial) | T | moreStatementExpressions(int pos, JCExpression first, T stats) | JCModifiers | optFinal(long flags) | static int | optag(Token token) Return operation tag of binary operator represented by token,
-1 if token is not a binary operator. | JCExpression | parExpression() | static int | prec(Token token) Return precedence of operator represented by token,
-1 if token is not a binary operator. | public JCExpression | qualident() | List<JCExpression> | qualidentList() | public JCStatement | statement() | protected void | storeEnd(JCTree tree, int endpos) Store ending position for a tree. | String | strval(Name prefix) | JCExpression | superSuffix(List<JCExpression> typeArgs, JCExpression t) | List<JCCase> | switchBlockStatementGroups() | JCExpression | term(int newmode) | JCExpression | term() | JCExpression | term1() | JCExpression | term1Rest(JCExpression t) | JCExpression | term2() | JCExpression | term2Rest(JCExpression t, int minprec) | protected JCExpression | term3() | JCExpression | termRest(JCExpression t) | protected T | to(T t) Store ending position for a tree. | protected T | toP(T t) Store ending position for a tree. | public JCExpression | type() | JCExpression | typeArgument() | List<JCExpression> | typeArguments() | JCTypeApply | typeArguments(JCExpression t) | JCExpression | typeArgumentsOpt(JCExpression t) | List<JCExpression> | typeArgumentsOpt() | List<JCExpression> | typeArgumentsOpt(int useMode) | JCTree | typeDeclaration(JCModifiers mods) | List<JCExpression> | typeList() | JCTypeParameter | typeParameter() | List<JCTypeParameter> | typeParametersOpt() | static int | typetag(Token token) Return type tag of basic type represented by token,
-1 if token is not a basic type identifier. | static int | unoptag(Token token) Return operation tag of unary operator represented by token,
-1 if token is not a binary operator. | JCVariableDecl | variableDeclarator(JCModifiers mods, JCExpression type, boolean reqInit, String dc) | JCVariableDecl | variableDeclaratorId(JCModifiers mods, JCExpression type) | JCVariableDecl | variableDeclaratorRest(int pos, JCModifiers mods, JCExpression type, Name name, boolean reqInit, String dc) | public T | variableDeclarators(JCModifiers mods, JCExpression type, T vdefs) | T | variableDeclaratorsRest(int pos, JCModifiers mods, JCExpression type, Name name, boolean reqInit, String dc, T vdefs) | public JCExpression | variableInitializer() |
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.
|
Parser | protected Parser(Factory fac, Lexer S, boolean keepDocComments)(Code) | | Construct a parser from a given scanner, tree factory and log.
|
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 |
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. |
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. |
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
|
|
|