mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-15 21:05:11 +00:00
8145416: Move sun.misc.ProxyGenerator to java.lang.reflect
Reviewed-by: alanb, mchung, rriggs
This commit is contained in:
parent
4baee38c64
commit
6853999d56
@ -34,7 +34,6 @@ import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.concurrent.atomic.AtomicLong;
|
||||
import java.util.function.BiFunction;
|
||||
import sun.misc.ProxyGenerator;
|
||||
import sun.misc.VM;
|
||||
import sun.reflect.CallerSensitive;
|
||||
import sun.reflect.Reflection;
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.misc;
|
||||
package java.lang.reflect;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.DataOutputStream;
|
||||
@ -53,7 +53,7 @@ import sun.security.action.GetBooleanAction;
|
||||
* @author Peter Jones
|
||||
* @since 1.3
|
||||
*/
|
||||
public class ProxyGenerator {
|
||||
class ProxyGenerator {
|
||||
/*
|
||||
* In the comments below, "JVMS" refers to The Java Virtual Machine
|
||||
* Specification Second Edition and "JLS" refers to the original
|
||||
@ -314,13 +314,13 @@ public class ProxyGenerator {
|
||||
private static final boolean saveGeneratedFiles =
|
||||
java.security.AccessController.doPrivileged(
|
||||
new GetBooleanAction(
|
||||
"sun.misc.ProxyGenerator.saveGeneratedFiles")).booleanValue();
|
||||
"jdk.proxy.ProxyGenerator.saveGeneratedFiles")).booleanValue();
|
||||
|
||||
/**
|
||||
* Generate a public proxy class given a name and a list of proxy interfaces.
|
||||
*/
|
||||
public static byte[] generateProxyClass(final String name,
|
||||
Class<?>[] interfaces) {
|
||||
static byte[] generateProxyClass(final String name,
|
||||
Class<?>[] interfaces) {
|
||||
return generateProxyClass(name, interfaces, (ACC_PUBLIC | ACC_FINAL | ACC_SUPER));
|
||||
}
|
||||
|
||||
@ -331,9 +331,9 @@ public class ProxyGenerator {
|
||||
* @param interfaces proxy interfaces
|
||||
* @param accessFlags access flags of the proxy class
|
||||
*/
|
||||
public static byte[] generateProxyClass(final String name,
|
||||
Class<?>[] interfaces,
|
||||
int accessFlags)
|
||||
static byte[] generateProxyClass(final String name,
|
||||
Class<?>[] interfaces,
|
||||
int accessFlags)
|
||||
{
|
||||
ProxyGenerator gen = new ProxyGenerator(name, interfaces, accessFlags);
|
||||
final byte[] classFile = gen.generateClassFile();
|
||||
@ -24,7 +24,7 @@
|
||||
/*
|
||||
* @test
|
||||
* @bug 4346224
|
||||
* @summary Test against a typo in sun.misc.ProxyGenerator:
|
||||
* @summary Test against a typo in ProxyGenerator:
|
||||
* "java/lang/Character" should be used instead of
|
||||
* "java/lang/Char".
|
||||
*/
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user