Merge pull request #14401 from Marcono1234/marcono1234/ClassInstanceExpr-type-argument-doc

Java: Adjust `ClassInstanceExpr` type argument predicates docs
This commit is contained in:
Anders Schack-Mulligen 2023-10-09 13:01:18 +02:00 коммит произвёл GitHub
Родитель e38ba27a65 2c0dcd3a2d
Коммит 8c6a1be070
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -1199,15 +1199,15 @@ class ClassInstanceExpr extends Expr, ConstructorCall, @classinstancexpr {
}
/**
* Gets a type argument provided to the constructor of this class instance creation expression.
* Gets a type argument of the type of the created instance.
*
* This is used for instantiations of parameterized classes.
* This is used for instantiations of parameterized classes. For example for
* `new ArrayList<String>()` the result would be the expression representing `String`.
*/
Expr getATypeArgument() { result = this.getTypeName().(TypeAccess).getATypeArgument() }
/**
* Gets the type argument provided to the constructor of this class instance creation expression
* at the specified (zero-based) position.
* Gets the type argument of the type of the created instance, at the specified (zero-based) position.
*/
Expr getTypeArgument(int index) {
result = this.getTypeName().(TypeAccess).getTypeArgument(index)