< prev index next >

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

Print this page
*** 60,10 ***
--- 60,16 ---
      /**
       * Returns true if the given flags has MN_HIDDEN_MEMBER flag set.
       */
      boolean isHiddenMember(int flags);
  
+     /**
+      * Returns true if the member of the given method handle is a null-restricted
+      * field.
+      */
+     boolean isNullRestrictedField(MethodHandle mh);
+ 
      /**
       * Returns a map of class name in internal forms to its corresponding
       * class bytes per the given stream of LF_RESOLVE and SPECIES_RESOLVE
       * trace logs. Used by GenerateJLIClassesPlugin to enable generation
       * of such classes during the jlink phase.

*** 168,6 ***
--- 174,16 ---
       * and then invoke the given constructor of one of its superclasses.
       *
       * This method should only be used by ReflectionFactory::newConstructorForSerialization.
       */
      MethodHandle serializableConstructor(Class<?> decl, Constructor<?> ctorToCall) throws IllegalAccessException;
+ 
+     /**
+      * Asserts a method handle to be another type without the conversion adaptions.
+      * Useful to avoid many redundant casts.
+      *
+      * @param original original MH
+      * @param assertedType the asserted type the origina MH can execute as
+      * @return the cheap view without extra adaptions
+      */
+     MethodHandle assertAsType(MethodHandle original, MethodType assertedType);
  }
< prev index next >