< prev index next > src/java.base/share/classes/java/lang/reflect/AccessibleObject.java
Print this page
/*
! * Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
/*
! * Copyright (c) 1997, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
import jdk.internal.access.SharedSecrets;
import jdk.internal.misc.VM;
import jdk.internal.reflect.CallerSensitive;
import jdk.internal.reflect.Reflection;
import jdk.internal.reflect.ReflectionFactory;
+ import jdk.internal.vm.annotation.AOTRuntimeSetup;
+ import jdk.internal.vm.annotation.AOTSafeClassInitializer;
/**
* The {@code AccessibleObject} class is the base class for {@code Field},
* {@code Method}, and {@code Constructor} objects (known as <em>reflected
* objects</em>). It provides the ability to flag a reflected object as
*
* @spec jni/index.html Java Native Interface Specification
* @jls 6.6 Access Control
* @since 1.2
*/
+ @AOTSafeClassInitializer
public class AccessibleObject implements AnnotatedElement {
static {
+ runtimeSetup();
+ }
+
+ @AOTRuntimeSetup
+ private static void runtimeSetup() {
// AccessibleObject is initialized early in initPhase1
SharedSecrets.setJavaLangReflectAccess(new ReflectAccess());
}
/**
< prev index next >