< prev index next >

src/java.base/share/classes/jdk/internal/access/JavaLangReflectAccess.java

Print this page
*** 24,10 ***
--- 24,13 ---
   */
  
  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 {

*** 71,6 ***
--- 74,9 ---
      /**
       * 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 >