Package-level declarations
Types
Link copied to clipboard
A usage of the keyword "assert" In
assert dead : "Wasn't expecting to be dead here"; the check is "dead" and the message is the string.Link copied to clipboard
Link copied to clipboard
Statements in between { and }.
Link copied to clipboard
The catch part of a try-catch-finally.
Link copied to clipboard
A continue statement with an optional label;
continue brains;continue;Link copied to clipboard
open class DoStmt : Statement, NodeWithBody<DoStmt> , NodeWithCondition<DoStmt> , NodeWithContracts<DoStmt>
A do-while.
Link copied to clipboard
open class ExplicitConstructorInvocationStmt : Statement, NodeWithTypeArguments<ExplicitConstructorInvocationStmt> , NodeWithArguments<ExplicitConstructorInvocationStmt> , Resolvable<ResolvedConstructorDeclaration>
A call to super or this in a constructor or initializer.
Link copied to clipboard
Used to wrap an expression so that it can take the place of a statement.
Link copied to clipboard
A for-each statement.
Link copied to clipboard
The classic for statement
Examples:for(int a=3, b=5; a<99; a++, b++) hello();for(a=3, b=5; a<99; a++) { hello(); }for(a(),b();;) hello();
- initialization is a list of expressions. These can be any kind of expression as can be seen in example 3, but the common ones are a single VariableDeclarationExpr (which declares multiple variables) in example 1, or a list of AssignExpr's in example 2.
- compare is an expression, in example 1 and 2 it is a BinaryExpr. In example 3 there is no expression, it is empty.
- update is a list of expressions, in example 1 and 2 they are UnaryExpr's. In example 3 there is no expression, the list empty.
- body is a statement, in example 1 and 3 it is an ExpressionStmt. in example 2 it is a BlockStmt.
Link copied to clipboard
An if-then-else statement.
Link copied to clipboard
A statement that is labeled, like
label123: println("continuing");Link copied to clipboard
A class declaration inside a method.
Java 1.0
Not available.Link copied to clipboard
A record declaration inside a method.
Link copied to clipboard
The return statement, with an optional expression to return.
Link copied to clipboard
One case in a switch statement
The main Javadoc is in SwitchStmtJava 1.0-11
switch (i) {
case 1:
case 2:
System.out.println(444);
break;
default:
System.out.println(0);
}
Content copied to clipboard
Link copied to clipboard
The switch statement
Java 1.0-1.4
The basic C-like switch statement.Link copied to clipboard
open class SynchronizedStmt : Statement, NodeWithBlockStmt<SynchronizedStmt> , NodeWithExpression<SynchronizedStmt>
Usage of the synchronized keyword.
Link copied to clipboard
Usage of the throw statement.
Link copied to clipboard
Link copied to clipboard
A statement that had parse errors.
Link copied to clipboard
open class WhileStmt : Statement, NodeWithBody<WhileStmt> , NodeWithCondition<WhileStmt> , NodeWithContracts<WhileStmt>
A while statement.
Link copied to clipboard