Skip to content

Commit 8c6a1be

Browse files
authored
Merge pull request github#14401 from Marcono1234/marcono1234/ClassInstanceExpr-type-argument-doc
Java: Adjust `ClassInstanceExpr` type argument predicates docs
2 parents e38ba27 + 2c0dcd3 commit 8c6a1be

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

java/ql/lib/semmle/code/java/Expr.qll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1199,15 +1199,15 @@ class ClassInstanceExpr extends Expr, ConstructorCall, @classinstancexpr {
11991199
}
12001200

12011201
/**
1202-
* Gets a type argument provided to the constructor of this class instance creation expression.
1202+
* Gets a type argument of the type of the created instance.
12031203
*
1204-
* This is used for instantiations of parameterized classes.
1204+
* This is used for instantiations of parameterized classes. For example for
1205+
* `new ArrayList<String>()` the result would be the expression representing `String`.
12051206
*/
12061207
Expr getATypeArgument() { result = this.getTypeName().(TypeAccess).getATypeArgument() }
12071208

12081209
/**
1209-
* Gets the type argument provided to the constructor of this class instance creation expression
1210-
* at the specified (zero-based) position.
1210+
* Gets the type argument of the type of the created instance, at the specified (zero-based) position.
12111211
*/
12121212
Expr getTypeArgument(int index) {
12131213
result = this.getTypeName().(TypeAccess).getTypeArgument(index)

0 commit comments

Comments
 (0)