< prev index next > src/java.base/share/classes/jdk/internal/access/JavaLangAccess.java
Print this page
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;
/**
* 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);
/**
* 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 >