mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8316970: Add internal annotation to mark restricted methods
Reviewed-by: jvernee, iris, alanb
This commit is contained in:
parent
77fac0f4c6
commit
798125152b
7 changed files with 221 additions and 0 deletions
|
@ -45,6 +45,7 @@ import java.util.stream.Collectors;
|
|||
import java.util.stream.Stream;
|
||||
|
||||
import jdk.internal.javac.PreviewFeature;
|
||||
import jdk.internal.javac.Restricted;
|
||||
import jdk.internal.loader.ClassLoaderValue;
|
||||
import jdk.internal.loader.Loader;
|
||||
import jdk.internal.loader.LoaderPool;
|
||||
|
@ -325,6 +326,7 @@ public final class ModuleLayer {
|
|||
*/
|
||||
@PreviewFeature(feature=PreviewFeature.Feature.FOREIGN)
|
||||
@CallerSensitive
|
||||
@Restricted
|
||||
public Controller enableNativeAccess(Module target) {
|
||||
ensureInLayer(target);
|
||||
Reflection.ensureNativeAccess(Reflection.getCallerClass(), Module.class,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue