< prev index next >

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

Print this page
@@ -25,10 +25,11 @@
  
  package jdk.internal.access;
  
  import java.io.InputStream;
  import java.lang.annotation.Annotation;
+ import java.lang.foreign.MemorySegment;
  import java.lang.invoke.MethodHandle;
  import java.lang.invoke.MethodType;
  import java.lang.module.ModuleDescriptor;
  import java.lang.reflect.Executable;
  import java.lang.reflect.Method;

@@ -271,11 +272,11 @@
  
      /**
       * Ensure that the given module has native access. If not, warn or
       * throw exception depending on the configuration.
       */
-     void ensureNativeAccess(Module m, Class<?> owner, String methodName);
+     void ensureNativeAccess(Module m, Class<?> owner, String methodName, Class<?> currentClass);
  
      /**
       * Returns the ServicesCatalog for the given Layer.
       */
      ServicesCatalog getServicesCatalog(ModuleLayer layer);

@@ -572,6 +573,16 @@
      /**
       * Returns '<loader-name>' @<id> if classloader has a name
       * explicitly set otherwise <qualified-class-name> @<id>
       */
      String getLoaderNameID(ClassLoader loader);
+ 
+     /**
+      * Copy the string bytes to an existing segment, avoiding intermediate copies.
+      */
+     void copyToSegmentRaw(String string, MemorySegment segment, long offset);
+ 
+     /**
+      * Are the string bytes compatible with the given charset?
+      */
+     boolean bytesCompatible(String string, Charset charset);
  }
< prev index next >