< prev index next >

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

Print this page
rev 58565 : 8238358: Implementation of JEP 371: Hidden Classes
Reviewed-by: duke
Contributed-by: mandy.chung@oracle.com, lois.foltan@oracle.com, david.holmes@oracle.com, harold.seigel@oracle.com, serguei.spitsyn@oracle.com, alex.buckley@oracle.com, jamsheed.c.m@oracle.com

*** 24,33 **** --- 24,36 ---- */ package jdk.internal.access; import java.lang.annotation.Annotation; + import java.lang.invoke.MethodHandle; + import java.lang.invoke.MethodHandles; + import java.lang.invoke.MethodType; import java.lang.module.ModuleDescriptor; import java.lang.reflect.Executable; import java.lang.reflect.Method; import java.net.URI; import java.nio.charset.CharacterCodingException;
*** 146,155 **** --- 149,166 ---- * Defines a class with the given name to a class loader. */ Class<?> defineClass(ClassLoader cl, String name, byte[] b, ProtectionDomain pd, String source); /** + * Defines a class with the given name to a class loader with + * the given flags and class data. + * + * @see java.lang.invoke.MethodHandles.Lookup#defineClass + */ + Class<?> defineClass(ClassLoader cl, Class<?> lookup, String name, byte[] b, ProtectionDomain pd, boolean initialize, int flags, Object classData); + + /** * Returns a class loaded by the bootstrap class loader. */ Class<?> findBootstrapClassOrNull(ClassLoader cl, String name); /**
*** 309,314 **** --- 320,342 ---- /** * Set the cause of Throwable * @param cause set t's cause to new value */ void setCause(Throwable t, Throwable cause); + + /** + * Get protection domain of the given Class + */ + ProtectionDomain protectionDomain(Class<?> c); + + /** + * Get a method handle of string concat helper method + */ + MethodHandle stringConcatHelper(String name, MethodType methodType); + + /* + * Get the class data associated with the given class. + * @param c the class + * @see java.lang.invoke.MethodHandles.Lookup#defineHiddenClass(byte[], boolean, MethodHandles.Lookup.ClassOption...) + */ + Object classData(Class<?> c); }
< prev index next >