mirror of
https://github.com/github/codeql.git
synced 2025-12-17 17:23:36 +01:00
277 lines
39 KiB
ReStructuredText
277 lines
39 KiB
ReStructuredText
Classes for working with Java code
|
||
==================================
|
||
|
||
CodeQL has a large selection of classes for working with Java statements and expressions.
|
||
|
||
.. _Expr: https://help.semmle.com/qldoc/java/semmle/code/java/Expr.qll/type.Expr$Expr.html
|
||
.. _Stmt: https://help.semmle.com/qldoc/java/semmle/code/java/Statement.qll/type.Statement$Stmt.html
|
||
.. _VarAccess: https://help.semmle.com/qldoc/java/semmle/code/java/Expr.qll/type.Expr$VarAccess.html
|
||
.. _SwitchCase: https://help.semmle.com/qldoc/java/semmle/code/java/Statement.qll/type.Statement$SwitchCase.html
|
||
.. _TypeAccess: https://help.semmle.com/qldoc/java/semmle/code/java/Expr.qll/type.Expr$TypeAccess.html
|
||
.. _Member: https://help.semmle.com/qldoc/java/semmle/code/java/Member.qll/type.Member$Member.html
|
||
.. _Literal: https://help.semmle.com/qldoc/java/semmle/code/java/Expr.qll/type.Expr$Literal.html
|
||
|
||
Statement classes
|
||
-----------------
|
||
|
||
This table lists all subclasses of `Stmt`_.
|
||
|
||
+------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+---------------------------------------------+
|
||
| Statement syntax | CodeQL class | Superclasses | Remarks |
|
||
+========================================================================+===========================================================================================================================================================+===================================+=============================================+
|
||
| ``;`` | `EmptyStmt <https://help.semmle.com/qldoc/java/semmle/code/java/Statement.qll/type.Statement$EmptyStmt.html>`__ | | |
|
||
+------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+---------------------------------------------+
|
||
| `Expr`_ ``;`` | `ExprStmt <https://help.semmle.com/qldoc/java/semmle/code/java/Statement.qll/type.Statement$ExprStmt.html>`__ | | |
|
||
+------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+---------------------------------------------+
|
||
| ``{`` `Stmt`_ ``... }`` | `Block <https://help.semmle.com/qldoc/java/semmle/code/java/Statement.qll/type.Statement$Block.html>`__ | | |
|
||
+------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+---------------------------------------------+
|
||
| ``if (`` `Expr`_ ``)`` `Stmt`_ ``else`` `Stmt`_ | `IfStmt <https://help.semmle.com/qldoc/java/semmle/code/java/Statement.qll/type.Statement$IfStmt.html>`__ | ``ConditionalStmt`` | |
|
||
+------------------------------------------------------------------------+ + + +
|
||
| ``if (`` `Expr`_ ``)`` `Stmt`_ | | | |
|
||
+------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+---------------------------------------------+
|
||
| ``while (`` `Expr`_ ``)`` `Stmt`_ | `WhileStmt <https://help.semmle.com/qldoc/java/semmle/code/java/Statement.qll/type.Statement$WhileStmt.html>`__ | ``ConditionalStmt``, ``LoopStmt`` | |
|
||
+------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+---------------------------------------------+
|
||
| ``do`` `Stmt`_ ``while (`` `Expr`_ ``)`` | `DoStmt <https://help.semmle.com/qldoc/java/semmle/code/java/Statement.qll/type.Statement$DoStmt.html>`__ | ``ConditionalStmt``, ``LoopStmt`` | |
|
||
+------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+---------------------------------------------+
|
||
| ``for (`` `Expr`_ ``;`` `Expr`_ ``;`` `Expr`_ ``)`` `Stmt`_ | `ForStmt <https://help.semmle.com/qldoc/java/semmle/code/java/Statement.qll/type.Statement$ForStmt.html>`__ | ``ConditionalStmt``, ``LoopStmt`` | |
|
||
+------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+---------------------------------------------+
|
||
| ``for (`` `VarAccess`_ ``:`` `Expr`_ ``)`` `Stmt`_ | `EnhancedForStmt <https://help.semmle.com/qldoc/java/semmle/code/java/Statement.qll/type.Statement$EnhancedForStmt.html>`__ | ``LoopStmt`` | |
|
||
+------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+---------------------------------------------+
|
||
| ``switch (`` `Expr`_ ``) {`` `SwitchCase`_ ``... }`` | `SwitchStmt <https://help.semmle.com/qldoc/java/semmle/code/java/Statement.qll/type.Statement$SwitchStmt.html>`__ | | |
|
||
+------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+---------------------------------------------+
|
||
| ``try {`` `Stmt`_ ``... } finally {`` `Stmt`_ ``... }`` | `TryStmt <https://help.semmle.com/qldoc/java/semmle/code/java/Statement.qll/type.Statement$TryStmt.html>`__ | | |
|
||
+------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+---------------------------------------------+
|
||
| ``return`` `Expr`_ ``;`` | `ReturnStmt <https://help.semmle.com/qldoc/java/semmle/code/java/Statement.qll/type.Statement$ReturnStmt.html>`__ | | |
|
||
+------------------------------------------------------------------------+ + + +
|
||
| ``return ;`` | | | |
|
||
+------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+---------------------------------------------+
|
||
| ``throw`` `Expr`_ ``;`` | `ThrowStmt <https://help.semmle.com/qldoc/java/semmle/code/java/Statement.qll/type.Statement$ThrowStmt.html>`__ | | |
|
||
+------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+---------------------------------------------+
|
||
| ``break ;`` | `BreakStmt <https://help.semmle.com/qldoc/java/semmle/code/java/Statement.qll/type.Statement$BreakStmt.html>`__ | ``JumpStmt`` | |
|
||
+------------------------------------------------------------------------+ + + +
|
||
| ``break label ;`` | | | |
|
||
+------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+---------------------------------------------+
|
||
| ``continue ;`` | `ContinueStmt <https://help.semmle.com/qldoc/java/semmle/code/java/Statement.qll/type.Statement$ContinueStmt.html>`__ | ``JumpStmt`` | |
|
||
+------------------------------------------------------------------------+ + + +
|
||
| ``continue label ;`` | | | |
|
||
+------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+---------------------------------------------+
|
||
| ``label :`` `Stmt`_ | `LabeledStmt <https://help.semmle.com/qldoc/java/semmle/code/java/Statement.qll/type.Statement$LabeledStmt.html>`__ | | |
|
||
+------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+---------------------------------------------+
|
||
| ``synchronized (`` `Expr`_ ``)`` `Stmt`_ | `SynchronizedStmt <https://help.semmle.com/qldoc/java/semmle/code/java/Statement.qll/type.Statement$SynchronizedStmt.html>`__ | | |
|
||
+------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+---------------------------------------------+
|
||
| ``assert`` `Expr`_ ``:`` `Expr`_ ``;`` | `AssertStmt <https://help.semmle.com/qldoc/java/semmle/code/java/Statement.qll/type.Statement$AssertStmt.html>`__ | | |
|
||
+------------------------------------------------------------------------+ + + +
|
||
| ``assert`` `Expr`_ ``;`` | | | |
|
||
+------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+---------------------------------------------+
|
||
| `TypeAccess`_ ``name ;`` | `LocalVariableDeclStmt <https://help.semmle.com/qldoc/java/semmle/code/java/Statement.qll/type.Statement$LocalVariableDeclStmt.html>`__ | | |
|
||
+------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+---------------------------------------------+
|
||
| ``class name {`` `Member`_ ``... } ;`` | `LocalClassDeclStmt <https://help.semmle.com/qldoc/java/semmle/code/java/Statement.qll/type.Statement$LocalClassDeclStmt.html>`__ | | |
|
||
+------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+---------------------------------------------+
|
||
| ``this (`` `Expr`_ ``, ... ) ;`` | `ThisConstructorInvocationStmt <https://help.semmle.com/qldoc/java/semmle/code/java/Statement.qll/type.Statement$ThisConstructorInvocationStmt.html>`__ | | |
|
||
+------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+---------------------------------------------+
|
||
| ``super (`` `Expr`_ ``, ... ) ;`` | `SuperConstructorInvocationStmt <https://help.semmle.com/qldoc/java/semmle/code/java/Statement.qll/type.Statement$SuperConstructorInvocationStmt.html>`__ | | |
|
||
+------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+---------------------------------------------+
|
||
| ``catch (`` `TypeAccess`_ ``name ) {`` `Stmt`_ ``... }`` | `CatchClause <https://help.semmle.com/qldoc/java/semmle/code/java/Statement.qll/type.Statement$CatchClause.html>`__ | | can only occur as child of a ``TryStmt`` |
|
||
+------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+---------------------------------------------+
|
||
| ``case`` `Literal`_ ``:`` `Stmt`_ ``...`` | `ConstCase <https://help.semmle.com/qldoc/java/semmle/code/java/Statement.qll/type.Statement$ConstCase.html>`__ | | can only occur as child of a ``SwitchStmt`` |
|
||
+------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+---------------------------------------------+
|
||
| ``default :`` `Stmt`_ ``...`` | `DefaultCase <https://help.semmle.com/qldoc/java/semmle/code/java/Statement.qll/type.Statement$DefaultCase.html>`__ | | can only occur as child of a ``SwitchStmt`` |
|
||
+------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+---------------------------------------------+
|
||
|
||
Expression classes
|
||
------------------
|
||
|
||
There are many expression classes, so we present them by category. All classes in this section are subclasses of `Expr <https://help.semmle.com/qldoc/java/semmle/code/java/Expr.qll/type.Expr$Expr.html>`__.
|
||
|
||
Literals
|
||
~~~~~~~~
|
||
|
||
All classes in this subsection are subclasses of `Literal <https://help.semmle.com/qldoc/java/semmle/code/java/Expr.qll/type.Expr$Literal.html>`__.
|
||
|
||
+---------------------------+--------------------------+
|
||
| Expression syntax example | CodeQL class |
|
||
+===========================+==========================+
|
||
| ``true`` | ``BooleanLiteral`` |
|
||
+---------------------------+--------------------------+
|
||
| ``23`` | ``IntegerLiteral`` |
|
||
+---------------------------+--------------------------+
|
||
| ``23l`` | ``LongLiteral`` |
|
||
+---------------------------+--------------------------+
|
||
| ``4.2f`` | ``FloatingPointLiteral`` |
|
||
+---------------------------+--------------------------+
|
||
| ``4.2`` | ``DoubleLiteral`` |
|
||
+---------------------------+--------------------------+
|
||
| ``'a'`` | ``CharacterLiteral`` |
|
||
+---------------------------+--------------------------+
|
||
| ``"Hello"`` | ``StringLiteral`` |
|
||
+---------------------------+--------------------------+
|
||
| ``null`` | ``NullLiteral`` |
|
||
+---------------------------+--------------------------+
|
||
|
||
Unary expressions
|
||
~~~~~~~~~~~~~~~~~
|
||
|
||
All classes in this subsection are subclasses of `UnaryExpr <https://help.semmle.com/qldoc/java/semmle/code/java/Expr.qll/type.Expr$UnaryExpr.html>`__.
|
||
|
||
+---------------------------+-----------------+---------------------+---------------------------------------------------+
|
||
| Expression syntax example | CodeQL class | Superclasses | Remarks |
|
||
+===========================+=================+=====================+===================================================+
|
||
| ``x++`` | ``PostIncExpr`` | ``UnaryAssignExpr`` | |
|
||
+---------------------------+-----------------+---------------------+---------------------------------------------------+
|
||
| ``x--`` | ``PostDecExpr`` | ``UnaryAssignExpr`` | |
|
||
+---------------------------+-----------------+---------------------+---------------------------------------------------+
|
||
| ``++x`` | ``PreIncExpr`` | ``UnaryAssignExpr`` | |
|
||
+---------------------------+-----------------+---------------------+---------------------------------------------------+
|
||
| ``--x`` | ``PreDecExpr`` | ``UnaryAssignExpr`` | |
|
||
+---------------------------+-----------------+---------------------+---------------------------------------------------+
|
||
| ``~x`` | ``BitNotExpr`` | ``BitwiseExpr`` | see below for other subclasses of ``BitwiseExpr`` |
|
||
+---------------------------+-----------------+---------------------+---------------------------------------------------+
|
||
| ``-x`` | ``MinusExpr`` | | |
|
||
+---------------------------+-----------------+---------------------+---------------------------------------------------+
|
||
| ``+x`` | ``PlusExpr`` | | |
|
||
+---------------------------+-----------------+---------------------+---------------------------------------------------+
|
||
| ``!x`` | ``LogNotExpr`` | ``LogicExpr`` | see below for other subclasses of ``LogicExpr`` |
|
||
+---------------------------+-----------------+---------------------+---------------------------------------------------+
|
||
|
||
Binary expressions
|
||
~~~~~~~~~~~~~~~~~~
|
||
|
||
All classes in this subsection are subclasses of `BinaryExpr <https://help.semmle.com/qldoc/java/semmle/code/java/Expr.qll/type.Expr$BinaryExpr.html>`__.
|
||
|
||
+---------------------------+--------------------+--------------------+
|
||
| Expression syntax example | CodeQL class | Superclasses |
|
||
+===========================+====================+====================+
|
||
| ``x * y`` | ``MulExpr`` | |
|
||
+---------------------------+--------------------+--------------------+
|
||
| ``x / y`` | ``DivExpr`` | |
|
||
+---------------------------+--------------------+--------------------+
|
||
| ``x % y`` | ``RemExpr`` | |
|
||
+---------------------------+--------------------+--------------------+
|
||
| ``x + y`` | ``AddExpr`` | |
|
||
+---------------------------+--------------------+--------------------+
|
||
| ``x - y`` | ``SubExpr`` | |
|
||
+---------------------------+--------------------+--------------------+
|
||
| ``x << y`` | ``LShiftExpr`` | |
|
||
+---------------------------+--------------------+--------------------+
|
||
| ``x >> y`` | ``RShiftExpr`` | |
|
||
+---------------------------+--------------------+--------------------+
|
||
| ``x >>> y`` | ``URShiftExpr`` | |
|
||
+---------------------------+--------------------+--------------------+
|
||
| ``x && y`` | ``AndLogicalExpr`` | ``LogicExpr`` |
|
||
+---------------------------+--------------------+--------------------+
|
||
| ``x || y`` | ``OrLogicalExpr`` | ``LogicExpr`` |
|
||
+---------------------------+--------------------+--------------------+
|
||
| ``x < y`` | ``LTExpr`` | ``ComparisonExpr`` |
|
||
+---------------------------+--------------------+--------------------+
|
||
| ``x > y`` | ``GTExpr`` | ``ComparisonExpr`` |
|
||
+---------------------------+--------------------+--------------------+
|
||
| ``x <= y`` | ``LEExpr`` | ``ComparisonExpr`` |
|
||
+---------------------------+--------------------+--------------------+
|
||
| ``x >= y`` | ``GEExpr`` | ``ComparisonExpr`` |
|
||
+---------------------------+--------------------+--------------------+
|
||
| ``x == y`` | ``EQExpr`` | ``EqualityTest`` |
|
||
+---------------------------+--------------------+--------------------+
|
||
| ``x != y`` | ``NEExpr`` | ``EqualityTest`` |
|
||
+---------------------------+--------------------+--------------------+
|
||
| ``x & y`` | ``AndBitwiseExpr`` | ``BitwiseExpr`` |
|
||
+---------------------------+--------------------+--------------------+
|
||
| ``x | y`` | ``OrBitwiseExpr`` | ``BitwiseExpr`` |
|
||
+---------------------------+--------------------+--------------------+
|
||
| ``x ^ y`` | ``XorBitwiseExpr`` | ``BitwiseExpr`` |
|
||
+---------------------------+--------------------+--------------------+
|
||
|
||
Assignment expressions
|
||
~~~~~~~~~~~~~~~~~~~~~~
|
||
|
||
All classes in this table are subclasses of `Assignment <https://help.semmle.com/qldoc/java/semmle/code/java/Expr.qll/type.Expr$Assignment.html>`__.
|
||
|
||
+---------------------------+-----------------------+--------------+
|
||
| Expression syntax example | CodeQL class | Superclasses |
|
||
+===========================+=======================+==============+
|
||
| ``x = y`` | ``AssignExpr`` | |
|
||
+---------------------------+-----------------------+--------------+
|
||
| ``x += y`` | ``AssignAddExpr`` | ``AssignOp`` |
|
||
+---------------------------+-----------------------+--------------+
|
||
| ``x -= y`` | ``AssignSubExpr`` | ``AssignOp`` |
|
||
+---------------------------+-----------------------+--------------+
|
||
| ``x *= y`` | ``AssignMulExpr`` | ``AssignOp`` |
|
||
+---------------------------+-----------------------+--------------+
|
||
| ``x /= y`` | ``AssignDivExpr`` | ``AssignOp`` |
|
||
+---------------------------+-----------------------+--------------+
|
||
| ``x %= y`` | ``AssignRemExpr`` | ``AssignOp`` |
|
||
+---------------------------+-----------------------+--------------+
|
||
| ``x &= y`` | ``AssignAndExpr`` | ``AssignOp`` |
|
||
+---------------------------+-----------------------+--------------+
|
||
| ``x |= y`` | ``AssignOrExpr`` | ``AssignOp`` |
|
||
+---------------------------+-----------------------+--------------+
|
||
| ``x ^= y`` | ``AssignXorExpr`` | ``AssignOp`` |
|
||
+---------------------------+-----------------------+--------------+
|
||
| ``x <<= y`` | ``AssignLShiftExpr`` | ``AssignOp`` |
|
||
+---------------------------+-----------------------+--------------+
|
||
| ``x >>= y`` | ``AssignRShiftExpr`` | ``AssignOp`` |
|
||
+---------------------------+-----------------------+--------------+
|
||
| ``x >>>= y`` | ``AssignURShiftExpr`` | ``AssignOp`` |
|
||
+---------------------------+-----------------------+--------------+
|
||
|
||
Accesses
|
||
~~~~~~~~
|
||
|
||
+--------------------------------------+-------------------------------------------------------------------------------------------------------------------------+
|
||
| Expression syntax examples | CodeQL class |
|
||
+======================================+=========================================================================================================================+
|
||
| ``this`` | `ThisAccess <https://help.semmle.com/qldoc/java/semmle/code/java/Expr.qll/type.Expr$ThisAccess.html>`__ |
|
||
+--------------------------------------+ +
|
||
| ``Outer.this`` | |
|
||
+--------------------------------------+-------------------------------------------------------------------------------------------------------------------------+
|
||
| ``super`` | `SuperAccess <https://help.semmle.com/qldoc/java/semmle/code/java/Expr.qll/type.Expr$SuperAccess.html>`__ |
|
||
+--------------------------------------+ +
|
||
| ``Outer.super`` | |
|
||
+--------------------------------------+-------------------------------------------------------------------------------------------------------------------------+
|
||
| ``x`` | `VarAccess <https://help.semmle.com/qldoc/java/semmle/code/java/Expr.qll/type.Expr$VarAccess.html>`__ |
|
||
+--------------------------------------+ +
|
||
| ``e.f`` | |
|
||
+--------------------------------------+-------------------------------------------------------------------------------------------------------------------------+
|
||
| ``a[i]`` | `ArrayAccess <https://help.semmle.com/qldoc/java/semmle/code/java/Expr.qll/type.Expr$ArrayAccess.html>`__ |
|
||
+--------------------------------------+-------------------------------------------------------------------------------------------------------------------------+
|
||
| ``f(...)`` | `MethodAccess <https://help.semmle.com/qldoc/java/semmle/code/java/Expr.qll/type.Expr$MethodAccess.html>`__ |
|
||
+--------------------------------------+ +
|
||
| ``e.m(...)`` | |
|
||
+--------------------------------------+-------------------------------------------------------------------------------------------------------------------------+
|
||
| ``String`` | `TypeAccess <https://help.semmle.com/qldoc/java/semmle/code/java/Expr.qll/type.Expr$TypeAccess.html>`__ |
|
||
+--------------------------------------+ +
|
||
| ``java.lang.String`` | |
|
||
+--------------------------------------+-------------------------------------------------------------------------------------------------------------------------+
|
||
| ``? extends Number`` | `WildcardTypeAccess <https://help.semmle.com/qldoc/java/semmle/code/java/Expr.qll/type.Expr$WildcardTypeAccess.html>`__ |
|
||
+--------------------------------------+ +
|
||
| ``? super Double`` | |
|
||
+--------------------------------------+-------------------------------------------------------------------------------------------------------------------------+
|
||
|
||
A ``VarAccess`` that refers to a field is a `FieldAccess <https://help.semmle.com/qldoc/java/semmle/code/java/Expr.qll/type.Expr$FieldAccess.html>`__.
|
||
|
||
Miscellaneous
|
||
~~~~~~~~~~~~~
|
||
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------+
|
||
| Expression syntax examples | CodeQL class | Remarks |
|
||
+==================================================================+=======================================================================================================================+=============================================================================+
|
||
| ``(int) f`` | `CastExpr <https://help.semmle.com/qldoc/java/semmle/code/java/Expr.qll/type.Expr$CastExpr.html>`__ | |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------+
|
||
| ``(23 + 42)`` | `ParExpr <https://help.semmle.com/qldoc/java/semmle/code/java/Expr.qll/type.Expr$ParExpr.html>`__ | |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------+
|
||
| ``o instanceof String`` | `InstanceOfExpr <https://help.semmle.com/qldoc/java/semmle/code/java/Expr.qll/type.Expr$InstanceOfExpr.html>`__ | |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------+
|
||
| `Expr`_ ``?`` `Expr`_ ``:`` `Expr`_ | `ConditionalExpr <https://help.semmle.com/qldoc/java/semmle/code/java/Expr.qll/type.Expr$ConditionalExpr.html>`__ | |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------+
|
||
| ``String. class`` | `TypeLiteral <https://help.semmle.com/qldoc/java/semmle/code/java/Expr.qll/type.Expr$TypeLiteral.html>`__ | |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------+
|
||
| ``new A()`` | `ClassInstanceExpr <https://help.semmle.com/qldoc/java/semmle/code/java/Expr.qll/type.Expr$ClassInstanceExpr.html>`__ | |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------+
|
||
| ``new String[3][2]`` | `ArrayCreationExpr <https://help.semmle.com/qldoc/java/semmle/code/java/Expr.qll/type.Expr$ArrayCreationExpr.html>`__ | |
|
||
+------------------------------------------------------------------+ + +
|
||
| ``new int[] { 23, 42 }`` | | |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------+
|
||
| ``{ 23, 42 }`` | `ArrayInit <https://help.semmle.com/qldoc/java/semmle/code/java/Expr.qll/type.Expr$ArrayInit.html>`__ | can only appear as an initializer or as a child of an ``ArrayCreationExpr`` |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------+
|
||
| ``@Annot(key=val)`` | `Annotation <https://help.semmle.com/qldoc/java/semmle/code/java/Annotation.qll/type.Annotation$Annotation.html>`__ | |
|
||
+------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------+
|