Module Expr

Provides classes for working with Java expressions.

Import path

semmle.code.java.Expr

Imports

Member

Provides classes and predicates for working with members of Java classes and interfaces, that is, methods, constructors, fields and nested types.

Statement

Provides classes and predicates for working with Java statements.

Type

Provides classes and predicates for working with Java types.

Variable

Provides classes and predicates for working with Java variables and their declarations.

Classes

AddExpr

A binary expression using the + operator.

AndBitwiseExpr

A binary expression using the & operator.

AndLogicalExpr

A binary expression using the && operator.

Argument

An argument to a call.

ArrayAccess

An array access.

ArrayCreationExpr

An array creation expression.

ArrayInit

An array initializer occurs in an array creation expression.

ArrayTypeAccess

An array type access is a type access of the form String[].

AssignAddExpr

A compound assignment expression using the += operator.

AssignAndExpr

A compound assignment expression using the &= operator.

AssignDivExpr

A compound assignment expression using the /= operator.

AssignExpr

A simple assignment expression using the = operator.

AssignLShiftExpr

A compound assignment expression using the <<= operator.

AssignMulExpr

A compound assignment expression using the *= operator.

AssignOp

A common super-class to represent compound assignments, which include an implicit operator.

AssignOrExpr

A compound assignment expression using the |= operator.

AssignRShiftExpr

A compound assignment expression using the >>= operator.

AssignRemExpr

A compound assignment expression using the %= operator.

AssignSubExpr

A compound assignment expression using the -= operator.

AssignURShiftExpr

A compound assignment expression using the >>>= operator.

AssignXorExpr

A compound assignment expression using the ^= operator.

Assignment

A common super-class that represents all varieties of assignments.

BinaryExpr

A common super-class to represent binary operator expressions.

BitNotExpr

A bit negation expression. For example, ~x.

BitwiseExpr

A bitwise expression.

BooleanLiteral

A boolean literal. Either true or false.

Call

Any call to a callable.

CastExpr

A cast expression.

CharacterLiteral

A character literal. For example, '\n'.

ClassInstanceExpr

A class instance creation expression.

ComparisonExpr

A comparison expression.

CompileTimeConstantExpr

A compile-time constant expression.

ConditionalExpr

A conditional expression of the form a ? b : c, where a is the condition, b is the expression that is evaluated if the condition evaluates to true, and c is the expression that is evaluated if the condition evaluates to false.

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 / operator.

DoubleLiteral

A double literal. For example, 4.2.

EQExpr

A binary expression using the == operator.

EqualityTest

An equality test is a binary expression using the == or != operator.

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.

FieldAccess

An expression that accesses a field.

FieldRead

An expression that reads a field.

FieldWrite

An expression that assigns a value to a field.

FloatingPointLiteral

A floating point literal. For example, 4.2f.

FunctionalExpr

A functional expression is either a lambda expression or a member reference expression.

GEExpr

A binary expression using the >= operator.

GTExpr

A binary expression using the > operator.

GreaterThanComparison

A comparison expression using the operator > or >=.

InstanceAccess

A use of one of the keywords this or super, which may be qualified.

InstanceOfExpr

An instanceof expression.

IntegerLiteral

An integer literal. For example, 23.

IntersectionTypeAccess

An intersection type access expression is a type access of the form T0 & T1 & ... & Tn, where T0 is a class or interface type and T1, ..., Tn are interface types.

LEExpr

A binary expression using the <= operator.

LShiftExpr

A binary expression using the << operator.

LTExpr

A binary expression using the < operator.

LValue

An l-value is a write access to a variable, which occurs as the destination of an assignment.

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).

LessThanComparison

A comparison expression using the operator < or <=.

Literal

A common super-class to represent constant literals.

LocalVariableDeclExpr

A local variable declaration expression.

LogNotExpr

A logical negation expression. For example, !b.

LogicExpr

A logical expression.

LongLiteral

A long literal. For example, 23l.

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.

MethodAccess

A method access is an invocation of a method with a list of arguments.

MinusExpr

A unary minus expression. For example, -i.

MulExpr

A binary expression using the * operator.

NEExpr

A binary expression using the != operator.

NullLiteral

The null literal, written null.

OrBitwiseExpr

A binary expression using the | operator.

OrLogicalExpr

A binary expression using the || operator.

PackageAccess

A package access.

ParExpr

A parenthesised expression.

PlusExpr

A unary plus expression. For example, +i.

PostDecExpr

A post-decrement expression. For example, i--.

PostIncExpr

A post-increment expression. For example, i++.

PreDecExpr

A pre-decrement expression. For example, --i.

PreIncExpr

A pre-increment expression. For example, ++i.

RShiftExpr

A binary expression using the >> operator.

RValue

An r-value is a read access to a variable.

RemExpr

A binary expression using the % operator.

StaticMethodAccess

A static method call.

StringLiteral

A string literal. For example, "hello world".

SubExpr

A binary expression using the - operator.

SuperAccess

A use of the keyword super, which may be qualified.

SuperMethodAccess

A call to a method in the superclass.

ThisAccess

A use of the keyword this, which may be qualified.

TypeAccess

A type access is a (possibly qualified) reference to a type.

TypeLiteral

A type literal. For example, String.class.

URShiftExpr

A binary expression using the >>> operator.

UnaryAssignExpr

A unary assignment expression is a unary expression using the prefix or postfix ++ or -- operator.

UnaryExpr

A common super-class that represents unary operator expressions.

UnionTypeAccess

A union type access is a type access of the form T1 | T2.

VarAccess

A variable access is a (possibly qualified) reference to a field, parameter or local variable.

VariableAssign

An assignment to a variable or an initialization of the variable.

VariableUpdate

An update of a variable or an initialization of the variable.

VirtualMethodAccess

A polymorphic call to an instance method.

WildcardTypeAccess

A wildcard type access, which may have either a lower or an upper bound.

XorBitwiseExpr

A binary expression using the ^ operator.