Java 14: add PREVIEW FEATURE notes to QLDoc

This commit is contained in:
yo-h
2020-04-05 12:27:49 -04:00
parent 697b273e32
commit 9a79e3be2c
2 changed files with 15 additions and 3 deletions

View File

@@ -1136,10 +1136,18 @@ class InstanceOfExpr extends Expr, @instanceofexpr {
else result.isNthChildOf(this, 0)
}
/** Holds if this `instanceof` expression uses pattern matching. */
/**
* PREVIEW FEATURE in Java 14. Subject to removal in a future release.
*
* Holds if this `instanceof` expression uses pattern matching.
*/
predicate isPattern() { exists(getLocalVariableDeclExpr()) }
/** Gets the local variable declaration of this `instanceof` expression if pattern matching is used. */
/**
* PREVIEW FEATURE in Java 14. Subject to removal in a future release.
*
* Gets the local variable declaration of this `instanceof` expression if pattern matching is used.
*/
LocalVariableDeclExpr getLocalVariableDeclExpr() { result.isNthChildOf(this, 0) }
/** Gets the access to the type on the right-hand side of the `instanceof` operator. */

View File

@@ -615,7 +615,11 @@ class Class extends RefType, @class {
}
}
/** A record declaration. */
/**
* PREVIEW FEATURE in Java 14. Subject to removal in a future release.
*
* A record declaration.
*/
class Record extends Class {
Record() { isRecord(this) }
}