Module Expr
Provides classes for working with Java expressions.
Import path
import semmle.code.java.Expr
Imports
java | Provides all default Java QL imports. |
Classes
AddExpr | A binary expression using the |
AndBitwiseExpr | A binary expression using the |
AndLogicalExpr | A binary expression using the |
Argument | An argument to a call. |
ArrayAccess | An array access. |
ArrayCreationExpr | An array creation expression. |
ArrayInit | An array initializer consisting of an opening and closing curly bracket and optionally containing expressions (which themselves can be array initializers) representing the elements of the array. For example: |
ArrayTypeAccess | An array type access is a type access of the form |
AssignAddExpr | A compound assignment expression using the |
AssignAndExpr | A compound assignment expression using the |
AssignDivExpr | A compound assignment expression using the |
AssignExpr | A simple assignment expression using the |
AssignLeftShiftExpr | A compound assignment expression using the |
AssignMulExpr | A compound assignment expression using the |
AssignOp | A common super-class to represent compound assignments, which include an implicit operator. |
AssignOrExpr | A compound assignment expression using the |
AssignRemExpr | A compound assignment expression using the |
AssignRightShiftExpr | A compound assignment expression using the |
AssignSubExpr | A compound assignment expression using the |
AssignUnsignedRightShiftExpr | A compound assignment expression using the |
AssignXorExpr | A compound assignment expression using the |
Assignment | A common super-class that represents many varieties of assignments. |
BinaryExpr | A common super-class to represent binary operator expressions. |
BitNotExpr | A bit negation expression. For example, |
BitwiseExpr | A bitwise expression. |
BooleanLiteral | A boolean literal. Either |
Call | Any call to a callable. |
CastExpr | A cast expression. |
CastingExpr | Any kind of expression that casts values from one type to another. |
CharacterLiteral | A character literal. For example, |
ChooseExpr | A conditional expression or a |
ClassExpr | A Kotlin |
ClassInstanceExpr | A class instance creation expression. |
ComparisonExpr | A comparison expression. |
CompileTimeConstantExpr | A compile-time constant expression. |
ConditionalExpr | A conditional expression of the form |
ConstructorCall | A constructor call, which occurs either as a constructor invocation inside a constructor, or as part of a class instance expression. |
DivExpr | A binary expression using the |
DoubleLiteral | A double literal. For example, |
EQExpr | A binary expression using Java’s |
EqualityTest | An equality test is a binary expression using Java’s |
ErrorExpr | An error expression. |
Expr | A common super-class that represents all kinds of expressions. |
ExprParent | An expression parent is an element that may have an expression as its child. |
ExtensionReceiverAccess | An access to an extension receiver parameter. This is a parameter access that takes the form of |
FieldAccess | An expression that accesses a field. |
FieldRead | An expression that reads a field. |
FieldWrite | An expression that assigns a value to a field. |
FloatLiteral | A float literal. For example, |
FunctionalExpr | A functional expression is either a lambda expression or a member reference expression. |
GEExpr | A binary expression using the |
GTExpr | A binary expression using the |
GreaterThanComparison | A comparison expression using the operator |
ImplicitCastExpr | An implicit cast expression. |
ImplicitCoercionToUnitExpr | An implicit coercion-to-unit expression. |
ImplicitNotNullExpr | An implicit cast-to-non-null expression. |
InstanceAccess | A use of one of the keywords |
InstanceOfExpr | An |
IntegerLiteral | An integer literal. For example, |
IntersectionTypeAccess | An intersection type access expression is a type access of the form |
KtInitializerAssignExpr | A Kotlin class member initializer assignment. |
LEExpr | A binary expression using the |
LTExpr | A binary expression using the |
LambdaExpr | Lambda expressions are represented by their implicit class instance creation expressions, which instantiate an anonymous class that overrides the unique method designated by their functional interface type. The parameters of the lambda expression correspond to the parameters of the overriding method, and the lambda body corresponds to the body of the overriding method (enclosed by a return statement and a block in the case of lambda expressions whose body is an expression). |
LeftShiftExpr | A binary expression using the |
LessThanComparison | A comparison expression using the operator |
Literal | A common super-class to represent constant literals. |
LocalVariableDeclExpr | A local variable declaration expression. |
LogNotExpr | A logical negation expression. For example, |
LogicExpr | A logical expression. |
LongLiteral | A long literal. For example, |
MemberRefExpr | Member references are represented by their implicit class instance expressions, which instantiate an anonymous class that overrides the unique method designated by their functional interface type. The correspondence of the parameters of the overriding method in the anonymous class with the parameters of the callable that is referenced differs depending on the particular kind of member reference expression. |
MethodCall | A method call is an invocation of a method with a list of arguments. |
MinusExpr | A unary minus expression. For example, |
MulExpr | A binary expression using the |
NEExpr | A binary expression using Java’s |
NewClassExpr | An explicit |
NotInstanceOfExpr | An |
NotNullExpr | A Kotlin not-null expression. For example, |
NullLiteral | The null literal, written |
OrBitwiseExpr | A binary expression using the |
OrLogicalExpr | A binary expression using the |
PackageAccess | A package access. |
PatternExpr | A binding, unnamed or record pattern. |
PlusExpr | A unary plus expression. For example, |
PostDecExpr | A post-decrement expression. For example, |
PostIncExpr | A post-increment expression. For example, |
PreDecExpr | A pre-decrement expression. For example, |
PreIncExpr | A pre-increment expression. For example, |
PropertyRefExpr | Property references are represented by their implicit class instance expressions, which instantiate an anonymous class that overrides the |
RecordBindingVariableExpr | A local variable declaration that occurs within a record pattern. |
RecordPatternExpr | A record pattern expr, as in |
ReferenceEqualityTest | An equality test is a binary expression using Java’s |
RemExpr | A binary expression using the |
RightShiftExpr | A binary expression using the |
SafeCastExpr | A safe cast expression. |
StaticMethodCall | A static method call. |
StmtExpr | A statement expression. |
StringLiteral | A string literal or text block (Java 15 feature). For example, |
StringTemplateExpr | A Kotlin string template expression. For example, |
SubExpr | A binary expression using the |
SuperAccess | A use of the keyword |
SuperMethodCall | A call to a method in the superclass. |
SwitchExpr | A |
ThisAccess | A use of the keyword |
TypeAccess | A type access is a (possibly qualified) reference to a type. |
TypeLiteral | A type literal. For example, |
UnaryAssignExpr | A unary assignment expression is a unary expression using the prefix or postfix |
UnaryExpr | A common super-class that represents unary operator expressions. |
UnionTypeAccess | A union type access is a type access of the form |
UnsafeCoerceExpr | An unsafe coerce expression. |
UnsignedRightShiftExpr | A binary expression using the |
ValueDiscardingExpr | An expression for which the value of the expression as a whole is discarded. Only cases of discarded values at the language level (as described by the JLS) are considered; data flow, for example to determine if an assigned variable value is ever read, is not considered. Such expressions can for example appear as part of an |
ValueEQExpr | A binary expression using the Kotlin |
ValueNEExpr | A binary expression using the Kotlin |
ValueOrReferenceEqualsExpr | A binary expression using either Java or Kotlin’s |
ValueOrReferenceNotEqualsExpr | A binary expression using either Java or Kotlin’s |
VarAccess | A variable access is a (possibly qualified) reference to a field, parameter or local variable. |
VarRead | A read access to a variable. |
VarWrite | A write access to a variable, which occurs as the destination of an assignment. |
VariableAssign | An assignment to a variable or an initialization of the variable. |
VariableUpdate | An update of a variable or an initialization of the variable. |
VirtualMethodCall | A polymorphic call to an instance method. |
WhenBranch | A Kotlin |
WhenExpr | A Kotlin |
WildcardTypeAccess | A wildcard type access, which may have either a lower or an upper bound. |
XorBitwiseExpr | A binary expression using the |
Aliases
LValue | DEPRECATED: Alias for |
MethodAccess | DEPRECATED: Alias for |
RValue | DEPRECATED: Alias for |
StaticMethodAccess | DEPRECATED: Alias for |
SuperMethodAccess | DEPRECATED: Alias for |
VirtualMethodAccess | DEPRECATED: Alias for |