This patch adds a new internal annotation that is used to mark all restricted me thods in the FFM API. The new annotation is similar to the one we used for preview API methods.
We plan to use the new annotation for adding new javac warnings when calling restricted methods, as well as to add better javadoc support for restricted methods. I have added a test which, similar to the test for `@CallerSensitive` checks all methods in `java.base` that are annotated with `@Restricted` and makes sure they conform to the list of restricted methods. ------------- Commit messages: - Add restricted method test - Initial push Changes: https://git.openjdk.org/jdk/pull/15947/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15947&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8316970 Stats: 222 lines in 7 files changed: 222 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/15947.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15947/head:pull/15947 PR: https://git.openjdk.org/jdk/pull/15947