AbstractMethodDeclaration: 19.9.1 AdditiveExpression: 19.12 AdditiveExpressionRest: 19.12 AndExpression: 19.12 AndExpressionRest: 19.12 ArgumentList: 19.12 ArgumentListRest: 19.12 ArrayAccess: 19.12 ArrayCreationExpression: 19.12 ArrayInitializer: 19.10 ArrayType: 19.4 Assignment: 19.12 AssignmentExpression: 19.12 AssignmentOperator: 19.12 Block: 19.11 BlockStatement: 19.11 BlockStatements: 19.11 BreakStatement: 19.11 CastExpression: 19.12 CatchClause: 19.11 Catches: 19.11 ClassBody: 19.8.1 ClassBodyDeclaration: 19.8.1 ClassBodyDeclarations: 19.8.1 ClassDeclaration: 19.8.1 ClassInstanceCreationExpression: 19.12 ClassMemberDeclaration: 19.8.1 ClassOrInterfaceType: 19.4 ClassType: 19.4 ClassTypeList: 19.8.3 ClassTypeListRest: 19.8.3 CompilationUnit: 19.6 ConditionalAndExpression: 19.12 ConditionalAndExpressionRest: 19.12 ConditionalExpression: 19.12 ConditionalExpressionRest: 19.12 ConditionalOrExpression: 19.12 ConditionalOrExpressionRest: 19.12 ConstantDeclaration: 19.9.1 ConstantExpression: 19.12 ConstructorBody: 19.8.5 ConstructorDeclaration: 19.8.5 ConstructorDeclarator: 19.8.5 ContinueStatement: 19.11 DimExpr: 19.12 DimExprs: 19.12 Dims: 19.12 DoStatement: 19.11 EmptyStatement: 19.11 EqualityExpression: 19.12 EqualityExpressionRest: 19.12 ExclusiveOrExpression: 19.12 ExclusiveOrExpressionRest: 19.12 ExplicitConstructorInvocation: 19.8.5 Expression: 19.12 ExpressionStatement: 19.11 ExtendsInterfaces: 19.9.1 FieldAccess: 19.12 FieldDeclaration: 19.8.2 Finally: 19.11 FloatingPointType: 19.4 ForInit: 19.11 ForStatement: 19.11 ForStatementNoShortIf: 19.11 ForUpdate: 19.11 FormalParameter: 19.8.3 FormalParameterList: 19.8.3 FormalParameterListRest: 19.8.3 Goal: 19.2 IfThenElseStatement: 19.11 IfThenElseStatementNoShortIf: 19.11 IfThenStatement: 19.11 ImportDeclaration: 19.6 ImportDeclarations: 19.6 InclusiveOrExpression: 19.12 InclusiveOrExpressionRest: 19.12 IntegralType: 19.4 InterfaceBody: 19.9.1 InterfaceDeclaration: 19.9.1 InterfaceMemberDeclaration: 19.9.1 InterfaceMemberDeclarations: 19.9.1 InterfaceMemberDeclarationsRest: 19.9.1 InterfaceType: 19.4 InterfaceTypeList: 19.8.1 InterfaceTypeListRest: 19.8.1 InterfaceTypes: 19.9.1 InterfaceTypesRest: 19.9.1 Interfaces: 19.8.1 LabeledStatement: 19.11 LabeledStatementNoShortIf: 19.11 LeftHandSide: 19.12 Literal: 19.3 LocalVariableDeclaration: 19.11 LocalVariableDeclarationStatement: 19.11 MethodBody: 19.8.3 MethodDeclaration: 19.8.3 MethodDeclarator: 19.8.3 MethodHeader: 19.8.3 MethodHeaderRest: 19.8.3 MethodInvocation: 19.12 Modifier: 19.7 Modifiers: 19.7 MultiplicativeExpression: 19.12 MultiplicativeExpressionRest: 19.12 Name: 19.5 NumericType: 19.4 PackageDeclaration: 19.6 PlusPlusOrMinusMinus: 19.12 PostArrayAccess: 19.12 PostFieldAccess: 19.12 PostIncrementOrDecrementExpression: 19.12 PostMethodInvocation: 19.12 PostfixExpression: 19.12 PreArrayAccess: 19.12 PreDecrementExpression: 19.12 PreFieldAccess: 19.12 PreIncrementExpression: 19.12 PreMethodInvocation: 19.12 Primary: 19.12 PrimaryNoNewArray: 19.12 PrimaryOrName: 19.12 PrimitiveType: 19.4 QualifiedName: 19.5 ReferenceType: 19.4 RelationalExpression: 19.12 RelationalExpressionRest: 19.12 ReturnStatement: 19.11 ShiftExpression: 19.12 ShiftExpressionRest: 19.12 SimpleName: 19.5 SingleTypeImportDeclaration: 19.6 Statement: 19.11 StatementExpression: 19.11 StatementExpressionList: 19.11 StatementExpressionListRest: 19.11 StatementNoShortIf: 19.11 StatementWithoutTrailingSubstatement: 19.11 StaticInitializer: 19.8.4 Super: 19.8.1 SwitchBlock: 19.11 SwitchBlockStatementGroup: 19.11 SwitchBlockStatementGroups: 19.11 SwitchLabel: 19.11 SwitchLabels: 19.11 SwitchStatement: 19.11 SynchronizedStatement: 19.11 ThrowStatement: 19.11 Throws: 19.8.3 TryStatement: 19.11 TryStatementRest: 19.11 Type: 19.4 TypeDeclaration: 19.6 TypeDeclarations: 19.6 TypeImportOnDemandDeclaration: 19.6 UnaryExpression: 19.12 UnaryExpressionNotPlusMinus: 19.12 VariableDeclarator: 19.8.2 VariableDeclaratorId: 19.8.2 VariableDeclaratorRest: 19.8.2 VariableDeclarators: 19.8.2 VariableDeclaratorsRest: 19.8.2 VariableInitializer: 19.8.2 VariableInitializers: 19.10 VariableInitializersRest: 19.10 WhileStatement: 19.11 WhileStatementNoShortIf: 19.11
Goal:
CompilationUnit
Literal:
IntegerLiteral
FloatingPointLiteral
BooleanLiteral
CharacterLiteral
StringLiteral
NullLiteral
Type:
PrimitiveType
ReferenceType PrimitiveType:
NumericType
boolean
NumericType:
IntegralType
FloatingPointType IntegralType: one of
byte short int long char
FloatingPointType: one of
float double
ReferenceType:
ClassOrInterfaceType
ArrayType ClassOrInterfaceType:
Name ClassType:
ClassOrInterfaceType InterfaceType:
ClassOrInterfaceType ArrayType:
PrimitiveType
Dims
Name
Dims
Name:
SimpleName
QualifiedName SimpleName:
Identifier QualifiedName:
Identifier . Name
CompilationUnit:
PackageDeclarationoptImportDeclarationsopt
TypeDeclarationsopt ImportDeclarations:
ImportDeclaration ImportDeclarationsopt
TypeDeclarations:
TypeDeclaration TypeDeclarationsopt
PackageDeclaration:
package
Name;
ImportDeclaration:
SingleTypeImportDeclaration
TypeImportOnDemandDeclaration SingleTypeImportDeclaration:
import
Name;
TypeImportOnDemandDeclaration:
import
Name. * ;
TypeDeclaration:
ClassDeclaration
InterfaceDeclaration
;
Modifiers:
Modifier Modifiersopt
Modifier: one of
main
public protected private
static
abstract final native synchronized transient volatile
ClassDeclaration:
Modifiersoptclass
IdentifierSuperopt
Interfacesopt
ClassBody Super:
extends
ClassType Interfaces:
implements
InterfaceTypeList InterfaceTypeList:
InterfaceType InterfaceTypeListRestopt
InterfaceTypeListRest:
, InterfaceTypeList
ClassBody:
{
ClassBodyDeclarationsopt}
ClassBodyDeclarations:
ClassBodyDeclaration ClassBodyDeclarationsopt
ClassBodyDeclaration:
ClassMemberDeclaration
StaticInitializer
ConstructorDeclaration ClassMemberDeclaration:
FieldDeclaration
MethodDeclaration
FieldDeclaration:
ModifiersoptType
VariableDeclarators
;
VariableDeclarators:
VariableDeclarator VariableDeclaratorsRestopt
VariableDeclaratorsRest:
, VariableDeclarators
VariableDeclarator:
VariableDeclaratorId VariableDeclaratorRestopt
VariableDeclaratorRest:
=
VariableInitializer
VariableDeclaratorId:
Identifier Dimsopt
VariableInitializer:
Expression
ArrayInitializer
MethodDeclaration:
MethodHeaderMethodBody MethodHeader:
Modifiersopt MethodHeaderRest
MethodHeaderRest:
Type MethodDeclaratorThrowsopt
void
MethodDeclaratorThrowsopt MethodDeclarator:
Identifier(
FormalParameterListopt) []opt
FormalParameterList:
FormalParameter FormalParameterListRestopt
FormalParameterListRest:
, FormalParameterList
FormalParameter:
TypeVariableDeclaratorId Throws:
throws
ClassTypeList ClassTypeList:
ClassType ClassTypeListRestopt
ClassTypeListRest:
, ClassTypeList
MethodBody:
Block
;
StaticInitializer:
static
Block
ConstructorDeclaration:
ModifiersoptConstructorDeclarator
Throwsopt
ConstructorBody ConstructorDeclarator:
SimpleName
(
FormalParameterListopt)
ConstructorBody:
{
ExplicitConstructorInvocationoptBlockStatementsopt
}
ExplicitConstructorInvocation:
this (
ArgumentListopt) ;
super (
ArgumentListopt) ;
InterfaceDeclaration:
Modifiersoptinterface
IdentifierExtendsInterfacesopt
InterfaceBody ExtendsInterfaces:
extends
InterfaceTypes
InterfaceTypes:
InterfaceType InterfaceTypesRestopt
InterfaceTypesRest:
, InterfaceTypes
InterfaceBody:
{
InterfaceMemberDeclarationsopt}
InterfaceMemberDeclarations:
InterfaceMemberDeclaration InterfaceMemberDeclarationsRestopt
InterfaceMemberDeclarationsRest:
InterfaceMemberDeclarations
InterfaceMemberDeclaration:
ConstantDeclaration
AbstractMethodDeclaration ConstantDeclaration:
FieldDeclaration AbstractMethodDeclaration:
MethodHeader;
ArrayInitializer:
{
VariableInitializersoptCommaopt}
VariableInitializers:
VariableInitializer VariableInitializersRestopt
VariableInitializersRest:
, VariableInitializers
Block:
{
BlockStatementsopt}
BlockStatements:
BlockStatement BlockStatementsopt
BlockStatement:
LocalVariableDeclarationStatement
Statement LocalVariableDeclarationStatement:
LocalVariableDeclaration;
LocalVariableDeclaration:
TypeVariableDeclarators Statement:
StatementWithoutTrailingSubstatement
LabeledStatement
IfThenStatement
IfThenElseStatement
WhileStatement
ForStatement StatementNoShortIf:
StatementWithoutTrailingSubstatement
LabeledStatementNoShortIf
IfThenElseStatementNoShortIf
WhileStatementNoShortIf
ForStatementNoShortIf StatementWithoutTrailingSubstatement:
Block
EmptyStatement
ExpressionStatement
SwitchStatement
DoStatement
BreakStatement
ContinueStatement
ReturnStatement
SynchronizedStatement
ThrowStatement
TryStatement EmptyStatement:
;
LabeledStatement:
Identifier:
Statement LabeledStatementNoShortIf:
Identifier:
StatementNoShortIf ExpressionStatement:
StatementExpression;
StatementExpression:
Assignment
PreIncrementExpression
PreDecrementExpression
PostIncrementOrDecrementExpression
MethodInvocation
ClassInstanceCreationExpression
IfThenStatement:
if (
Expression)
Statement IfThenElseStatement:
if (
Expression)
StatementNoShortIfelse
Statement IfThenElseStatementNoShortIf:
if (
Expression)
StatementNoShortIfelse
StatementNoShortIf SwitchStatement:
switch (
Expression)
SwitchBlock SwitchBlock:
{
SwitchBlockStatementGroupsoptSwitchLabelsopt
}
SwitchBlockStatementGroups:
SwitchBlockStatementGroup SwitchBlockStatementGroupsopt
SwitchBlockStatementGroup:
SwitchLabelsBlockStatements SwitchLabels:
SwitchLabel SwitchLabelsopt
SwitchLabel:
case
ConstantExpression:
WhileStatement:
default :
while (
Expression)
Statement WhileStatementNoShortIf:
while (
Expression)
StatementNoShortIf DoStatement:
do
Statementwhile (
Expression) ;
ForStatement:
for (
ForInitopt;
Expressionopt;
ForUpdateopt)
Statement ForStatementNoShortIf:
for (
ForInitopt;
Expressionopt;
ForUpdateopt)
StatementNoShortIf ForInit:
StatementExpressionList
LocalVariableDeclaration ForUpdate:
StatementExpressionList StatementExpressionList:
StatementExpression StatementExpressionListRestopt
StatementExpressionListRest:
, StatementExpressionList
BreakStatement:
break
Identifieropt;
ContinueStatement:
continu
e Identifieropt;
ReturnStatement:
return
Expressionopt;
ThrowStatement:
throw
Expression;
SynchronizedStatement:
synchronized (
Expression)
Block TryStatement:
try
Block TryStatementRest
TryStatementRest:
Catches
CatchesoptFinally Catches:
CatchClause Catchesopt
CatchClause:
catch (
FormalParameter)
Block Finally:
finally
Block
Primary:
PrimaryNoNewArray
ArrayCreationExpression PrimaryNoNewArray:
Literal
this
(
Expression)
ClassInstanceCreationExpression
FieldAccess
MethodInvocation
ArrayAccess ClassInstanceCreationExpression:
new
ClassType(
ArgumentListopt)
ArgumentList:
Expression ArgumentListRestopt
ArgumentListRest:
, ArgumentList
ArrayCreationExpression:
new
PrimitiveTypeDimExprs
Dimsopt
new
ClassOrInterfaceTypeDimExprs
Dimsopt DimExprs:
DimExpr DimExprsopt
DimExpr:
[
Expression]
Dims:
[ ] Dimsopt
FieldAccess:
super .
Identifier Primary.
Identifier
MethodInvocation:
Name(
ArgumentListopt)
Primary
.
Identifier(
ArgumentListopt)
Identifier
super .(
ArgumentListopt)
ArrayAccess:
Name[
Expression]
PrimaryNoNewArray
[
Expression]
PrimaryOrName:
Primary
Name
PostfixExpression:
PrimaryOrName PlusPlusOrMinusMinus opt
PostIncrementOrDecrementExpression:
PrimaryOrName PlusPlusOrMinusMinus
PlusPlusOrMinusMinus:
++ PlusPlusOrMinusMinusopt
-- PlusPlusOrMinusMinusopt
UnaryExpression:
PreIncrementExpression
PreDecrementExpression
+
UnaryExpression
-
UnaryExpression
UnaryExpressionNotPlusMinus PreIncrementExpression:
++
UnaryExpression PreDecrementExpression:
--
UnaryExpression UnaryExpressionNotPlusMinus:
PostfixExpression
~
UnaryExpression
!
UnaryExpression
CastExpression CastExpression:
(
PrimitiveTypeDimsopt
)
UnaryExpression
(
Expression)
UnaryExpressionNotPlusMinus
(
NameDims
)
UnaryExpressionNotPlusMinus MultiplicativeExpression:
UnaryExpression
MultiplicativeExpression*
UnaryExpression
MultiplicativeExpression/
UnaryExpression
MultiplicativeExpression%
UnaryExpression AdditiveExpression:
MultiplicativeExpression
AdditiveExpression+
MultiplicativeExpression
AdditiveExpression
-
MultiplicativeExpression ShiftExpression:
AdditiveExpression
ShiftExpression<<
AdditiveExpression
ShiftExpression>>
AdditiveExpression
ShiftExpression>>>
AdditiveExpression RelationalExpression:
ShiftExpression
RelationalExpression<
ShiftExpression
RelationalExpression>
ShiftExpression
RelationalExpression<=
ShiftExpression
RelationalExpression>=
ShiftExpression
RelationalExpressioninstanceof
ReferenceType EqualityExpression:
RelationalExpression
EqualityExpression==
RelationalExpression
EqualityExpression!=
RelationalExpression AndExpression:
EqualityExpression
AndExpression&
EqualityExpression ExclusiveOrExpression:
AndExpression
ExclusiveOrExpression^
AndExpression InclusiveOrExpression:
ExclusiveOrExpression
InclusiveOrExpression|
ExclusiveOrExpression ConditionalAndExpression:
InclusiveOrExpression
ConditionalAndExpression&&
InclusiveOrExpression ConditionalOrExpression:
ConditionalAndExpression
ConditionalOrExpression||
ConditionalAndExpression ConditionalExpression:
ConditionalOrExpression
ConditionalOrExpression?
Expression:
ConditionalExpression AssignmentExpression:
ConditionalExpression
Assignment Assignment:
LeftHandSideAssignmentOperator
AssignmentExpression LeftHandSide:
Name
FieldAccess
ArrayAccess AssignmentOperator: one of
= *= /= %= += -= <<= >>= >>>= &= ^= |=
Expression:
AssignmentExpression ConstantExpression:
Expression
Contents | Prev | Next | Index
Java Language Specification (HTML generated by dkramer on August 01, 1996)
Copyright © 1996 Sun Microsystems, Inc.
All rights reserved
Please send any comments or corrections to doug.kramer@sun.com