< prev index next > src/java.base/share/classes/jdk/internal/access/JavaLangReflectAccess.java
Print this page
*/
package jdk.internal.access;
import java.lang.reflect.*;
+ import java.util.Optional;
+ import java.util.function.Function;
+
import jdk.internal.reflect.*;
/** An interface which gives privileged packages Java-level access to
internals of java.lang.reflect. Use as a last resort! */
public interface JavaLangReflectAccess {
/**
* Check that the caller is allowed to unreflect for mutation a final instance field
* in a class that is not a record or hidden class.
*/
void checkAllowedToUnreflectFinalSetter(Class<?> caller, Field f) throws IllegalAccessException;
+
+ /** Cache code model on the reflective method instance (if none is set already). */
+ Optional<?> setCodeModelIfNeeded(Method method, Function<Method, Optional<?>> modelFactory);
}
< prev index next >