下述表格列出了所有Stmt的子类:
Statement syntax
CodeQL class
Superclasses
Remarks
;
Expr ;
{
Stmt ... }
for (
Expr ;
Expr ;
Expr )
Stmt
switch (
Expr ) {
SwitchCase ... }
try {
Stmt ... } finally {
Stmt ... }
return
Expr ;
return ;
throw
Expr ;
break ;
break label ;
continue ;
continue label ;
label :
Stmt
assert
Expr ;
TypeAccess name ;
class name {
Member ... } ;
this (
Expr , ... ) ;
super (
Expr , ... ) ;
SuperConstructorInvocationStmt
catch (
TypeAccess name ) {
Stmt ... }
can only occur as child of a TryStmt
can only occur as child of a SwitchStmt
default :
Stmt ...
can only occur as child of a SwitchStmt
表达式类分成很多种,本节的所有类都是Expr的子类。
下面表格中列出的都是Literal的子类:
Expression syntax example
CodeQL class
true
23
23l
4.2f
4.2
'a'
"Hello"
null
下面表格中列出的都是UnaryExpr的子类:
Expression syntax
CodeQL class
Superclasses
Remarks
Expr++
Expr--
++
Expr
--
Expr
~
Expr
see below for other subclasses of BitwiseExpr
!
Expr
see below for other subclasses of LogicExpr
下面表格中列出的都是BinaryExpr的子类:
Expression syntax
CodeQL class
Superclasses
下面表格中列出的都是 Assignment的子类:
Expression syntax
CodeQL class
Superclasses
Expression syntax examples
CodeQL class
this
Outer.this
super
Outer.super
x
e.f
a[i]
f(...)
e.m(...)
String
java.lang.String
? extends Number
? super Double
Expression syntax examples
CodeQL class
Remarks
(int) f
(23 + 42)
o instanceof String
String. class
new A()
new String[3][2]
new int[] { 23, 42 }
{ 23, 42 }
can only appear as an initializer or as a child of an ArrayCreationExpr
@Annot(key=val)