41 import java.security.CodeSource; |
41 import java.security.CodeSource; |
42 import java.security.Permissions; |
42 import java.security.Permissions; |
43 import java.security.PrivilegedAction; |
43 import java.security.PrivilegedAction; |
44 import java.security.ProtectionDomain; |
44 import java.security.ProtectionDomain; |
45 import java.security.SecureClassLoader; |
45 import java.security.SecureClassLoader; |
|
46 |
46 import jdk.internal.dynalink.beans.StaticClass; |
47 import jdk.internal.dynalink.beans.StaticClass; |
47 import jdk.internal.org.objectweb.asm.ClassWriter; |
48 import jdk.internal.org.objectweb.asm.ClassWriter; |
48 import jdk.internal.org.objectweb.asm.Opcodes; |
49 import jdk.internal.org.objectweb.asm.Opcodes; |
49 import jdk.internal.org.objectweb.asm.Type; |
50 import jdk.internal.org.objectweb.asm.Type; |
50 import jdk.internal.org.objectweb.asm.commons.InstructionAdapter; |
51 import jdk.internal.org.objectweb.asm.commons.InstructionAdapter; |
56 * It can be invoked repeatedly to create multiple adapter classes from the same bytecode; adapter classes that have |
57 * It can be invoked repeatedly to create multiple adapter classes from the same bytecode; adapter classes that have |
57 * class-level overrides must be re-created for every set of such overrides. Note that while this class is named |
58 * class-level overrides must be re-created for every set of such overrides. Note that while this class is named |
58 * "class loader", it does not, in fact, extend {@code ClassLoader}, but rather uses them internally. Instances of this |
59 * "class loader", it does not, in fact, extend {@code ClassLoader}, but rather uses them internally. Instances of this |
59 * class are normally created by {@link JavaAdapterBytecodeGenerator}. |
60 * class are normally created by {@link JavaAdapterBytecodeGenerator}. |
60 */ |
61 */ |
|
62 @SuppressWarnings("javadoc") |
61 class JavaAdapterClassLoader extends JavaAdapterGeneratorBase { |
63 class JavaAdapterClassLoader extends JavaAdapterGeneratorBase { |
62 private static final Type PRIVILEGED_ACTION_TYPE = Type.getType(PrivilegedAction.class); |
64 private static final Type PRIVILEGED_ACTION_TYPE = Type.getType(PrivilegedAction.class); |
63 |
65 |
64 private static final String PRIVILEGED_ACTION_TYPE_NAME = PRIVILEGED_ACTION_TYPE.getInternalName(); |
66 private static final String PRIVILEGED_ACTION_TYPE_NAME = PRIVILEGED_ACTION_TYPE.getInternalName(); |
65 private static final String PRIVILEGED_RUN_METHOD_DESCRIPTOR = Type.getMethodDescriptor(OBJECT_TYPE); |
67 private static final String PRIVILEGED_RUN_METHOD_DESCRIPTOR = Type.getMethodDescriptor(OBJECT_TYPE); |