8137058: Clear out all non-Critical APIs from sun.reflect
Reviewed-by: alanb, jfranck, mchung
This commit is contained in:
parent
d18a7a70c9
commit
07cdc33e34
@ -237,32 +237,32 @@ SUNWprivate_1.1 {
|
||||
Java_jdk_internal_misc_Signal_findSignal0;
|
||||
Java_jdk_internal_misc_Signal_handle0;
|
||||
Java_jdk_internal_misc_Signal_raise0;
|
||||
Java_sun_reflect_ConstantPool_getClassAt0;
|
||||
Java_sun_reflect_ConstantPool_getClassAtIfLoaded0;
|
||||
Java_sun_reflect_ConstantPool_getClassRefIndexAt0;
|
||||
Java_sun_reflect_ConstantPool_getDoubleAt0;
|
||||
Java_sun_reflect_ConstantPool_getFieldAt0;
|
||||
Java_sun_reflect_ConstantPool_getFieldAtIfLoaded0;
|
||||
Java_sun_reflect_ConstantPool_getFloatAt0;
|
||||
Java_sun_reflect_ConstantPool_getIntAt0;
|
||||
Java_sun_reflect_ConstantPool_getLongAt0;
|
||||
Java_sun_reflect_ConstantPool_getMemberRefInfoAt0;
|
||||
Java_sun_reflect_ConstantPool_getMethodAt0;
|
||||
Java_sun_reflect_ConstantPool_getMethodAtIfLoaded0;
|
||||
Java_sun_reflect_ConstantPool_getNameAndTypeRefIndexAt0;
|
||||
Java_sun_reflect_ConstantPool_getNameAndTypeRefInfoAt0;
|
||||
Java_sun_reflect_ConstantPool_getSize0;
|
||||
Java_sun_reflect_ConstantPool_getStringAt0;
|
||||
Java_sun_reflect_ConstantPool_getTagAt0;
|
||||
Java_sun_reflect_ConstantPool_getUTF8At0;
|
||||
Java_jdk_internal_reflect_ConstantPool_getClassAt0;
|
||||
Java_jdk_internal_reflect_ConstantPool_getClassAtIfLoaded0;
|
||||
Java_jdk_internal_reflect_ConstantPool_getClassRefIndexAt0;
|
||||
Java_jdk_internal_reflect_ConstantPool_getDoubleAt0;
|
||||
Java_jdk_internal_reflect_ConstantPool_getFieldAt0;
|
||||
Java_jdk_internal_reflect_ConstantPool_getFieldAtIfLoaded0;
|
||||
Java_jdk_internal_reflect_ConstantPool_getFloatAt0;
|
||||
Java_jdk_internal_reflect_ConstantPool_getIntAt0;
|
||||
Java_jdk_internal_reflect_ConstantPool_getLongAt0;
|
||||
Java_jdk_internal_reflect_ConstantPool_getMemberRefInfoAt0;
|
||||
Java_jdk_internal_reflect_ConstantPool_getMethodAt0;
|
||||
Java_jdk_internal_reflect_ConstantPool_getMethodAtIfLoaded0;
|
||||
Java_jdk_internal_reflect_ConstantPool_getNameAndTypeRefIndexAt0;
|
||||
Java_jdk_internal_reflect_ConstantPool_getNameAndTypeRefInfoAt0;
|
||||
Java_jdk_internal_reflect_ConstantPool_getSize0;
|
||||
Java_jdk_internal_reflect_ConstantPool_getStringAt0;
|
||||
Java_jdk_internal_reflect_ConstantPool_getTagAt0;
|
||||
Java_jdk_internal_reflect_ConstantPool_getUTF8At0;
|
||||
Java_java_io_Console_istty;
|
||||
Java_java_io_Console_encoding;
|
||||
Java_java_io_Console_echo;
|
||||
Java_sun_reflect_NativeConstructorAccessorImpl_newInstance0;
|
||||
Java_sun_reflect_NativeMethodAccessorImpl_invoke0;
|
||||
Java_sun_reflect_Reflection_getCallerClass__;
|
||||
Java_sun_reflect_Reflection_getCallerClass__I;
|
||||
Java_sun_reflect_Reflection_getClassAccessFlags;
|
||||
Java_jdk_internal_reflect_NativeConstructorAccessorImpl_newInstance0;
|
||||
Java_jdk_internal_reflect_NativeMethodAccessorImpl_invoke0;
|
||||
Java_jdk_internal_reflect_Reflection_getCallerClass__;
|
||||
Java_jdk_internal_reflect_Reflection_getCallerClass__I;
|
||||
Java_jdk_internal_reflect_Reflection_getClassAccessFlags;
|
||||
Java_jdk_internal_misc_VM_latestUserDefinedLoader;
|
||||
Java_jdk_internal_misc_VM_getuid;
|
||||
Java_jdk_internal_misc_VM_geteuid;
|
||||
|
@ -49,9 +49,9 @@ import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.ConcurrentMap;
|
||||
import jdk.internal.misc.Unsafe;
|
||||
import sun.reflect.CallerSensitive;
|
||||
import sun.reflect.Reflection;
|
||||
import sun.reflect.ReflectionFactory;
|
||||
import jdk.internal.reflect.CallerSensitive;
|
||||
import jdk.internal.reflect.Reflection;
|
||||
import jdk.internal.reflect.ReflectionFactory;
|
||||
import sun.reflect.misc.ReflectUtil;
|
||||
|
||||
import static java.io.ObjectStreamField.*;
|
||||
|
@ -26,8 +26,8 @@
|
||||
package java.io;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import sun.reflect.CallerSensitive;
|
||||
import sun.reflect.Reflection;
|
||||
import jdk.internal.reflect.CallerSensitive;
|
||||
import jdk.internal.reflect.Reflection;
|
||||
import sun.reflect.misc.ReflectUtil;
|
||||
|
||||
/**
|
||||
|
@ -66,10 +66,10 @@ import jdk.internal.loader.BootLoader;
|
||||
import jdk.internal.loader.BuiltinClassLoader;
|
||||
import jdk.internal.misc.Unsafe;
|
||||
import jdk.internal.misc.VM;
|
||||
import sun.reflect.CallerSensitive;
|
||||
import sun.reflect.ConstantPool;
|
||||
import sun.reflect.Reflection;
|
||||
import sun.reflect.ReflectionFactory;
|
||||
import jdk.internal.reflect.CallerSensitive;
|
||||
import jdk.internal.reflect.ConstantPool;
|
||||
import jdk.internal.reflect.Reflection;
|
||||
import jdk.internal.reflect.ReflectionFactory;
|
||||
import sun.reflect.generics.factory.CoreReflectionFactory;
|
||||
import sun.reflect.generics.factory.GenericsFactory;
|
||||
import sun.reflect.generics.repository.ClassRepository;
|
||||
@ -3473,7 +3473,7 @@ public final class Class<T> implements java.io.Serializable,
|
||||
if (reflectionFactory == null) {
|
||||
reflectionFactory =
|
||||
java.security.AccessController.doPrivileged
|
||||
(new sun.reflect.ReflectionFactory.GetReflectionFactoryAction());
|
||||
(new ReflectionFactory.GetReflectionFactoryAction());
|
||||
}
|
||||
return reflectionFactory;
|
||||
}
|
||||
|
@ -60,8 +60,8 @@ import jdk.internal.loader.ClassLoaders;
|
||||
import jdk.internal.misc.SharedSecrets;
|
||||
import jdk.internal.misc.Unsafe;
|
||||
import jdk.internal.misc.VM;
|
||||
import sun.reflect.CallerSensitive;
|
||||
import sun.reflect.Reflection;
|
||||
import jdk.internal.reflect.CallerSensitive;
|
||||
import jdk.internal.reflect.Reflection;
|
||||
import sun.reflect.misc.ReflectUtil;
|
||||
import sun.security.util.SecurityConstants;
|
||||
|
||||
|
@ -36,8 +36,8 @@ import java.security.PrivilegedAction;
|
||||
import java.util.Objects;
|
||||
|
||||
import jdk.internal.loader.BootLoader;
|
||||
import sun.reflect.CallerSensitive;
|
||||
import sun.reflect.Reflection;
|
||||
import jdk.internal.reflect.CallerSensitive;
|
||||
import jdk.internal.reflect.Reflection;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -27,8 +27,8 @@ package java.lang;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.StringTokenizer;
|
||||
import sun.reflect.CallerSensitive;
|
||||
import sun.reflect.Reflection;
|
||||
import jdk.internal.reflect.CallerSensitive;
|
||||
import jdk.internal.reflect.Reflection;
|
||||
|
||||
/**
|
||||
* Every Java application has a single instance of class
|
||||
|
@ -38,7 +38,7 @@ import java.net.InetAddress;
|
||||
import java.lang.reflect.*;
|
||||
import java.net.URL;
|
||||
|
||||
import sun.reflect.CallerSensitive;
|
||||
import jdk.internal.reflect.CallerSensitive;
|
||||
import sun.security.util.SecurityConstants;
|
||||
|
||||
/**
|
||||
|
@ -25,6 +25,7 @@
|
||||
package java.lang;
|
||||
|
||||
import jdk.internal.misc.VM;
|
||||
import jdk.internal.reflect.MethodAccessor;
|
||||
|
||||
import java.io.PrintStream;
|
||||
import java.lang.StackWalker.Option;
|
||||
@ -1081,13 +1082,13 @@ final class StackStreamFactory {
|
||||
}
|
||||
|
||||
private static boolean isReflectionFrame(Class<?> c) {
|
||||
if (c.getName().startsWith("sun.reflect") &&
|
||||
!sun.reflect.MethodAccessor.class.isAssignableFrom(c)) {
|
||||
throw new InternalError("Not sun.reflect.MethodAccessor: " + c.toString());
|
||||
if (c.getName().startsWith("jdk.internal.reflect") &&
|
||||
!MethodAccessor.class.isAssignableFrom(c)) {
|
||||
throw new InternalError("Not jdk.internal.reflect.MethodAccessor: " + c.toString());
|
||||
}
|
||||
// ## should filter all @Hidden frames?
|
||||
return c == Method.class ||
|
||||
sun.reflect.MethodAccessor.class.isAssignableFrom(c) ||
|
||||
MethodAccessor.class.isAssignableFrom(c) ||
|
||||
c.getName().startsWith("java.lang.invoke.LambdaForm");
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
*/
|
||||
package java.lang;
|
||||
|
||||
import sun.reflect.CallerSensitive;
|
||||
import jdk.internal.reflect.CallerSensitive;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.function.Consumer;
|
||||
|
@ -56,8 +56,8 @@ import java.util.Objects;
|
||||
import java.util.ResourceBundle;
|
||||
import java.util.function.Supplier;
|
||||
import sun.nio.ch.Interruptible;
|
||||
import sun.reflect.CallerSensitive;
|
||||
import sun.reflect.Reflection;
|
||||
import jdk.internal.reflect.CallerSensitive;
|
||||
import jdk.internal.reflect.Reflection;
|
||||
import sun.security.util.SecurityConstants;
|
||||
import sun.reflect.annotation.AnnotationType;
|
||||
import jdk.internal.HotSpotIntrinsicCandidate;
|
||||
@ -1978,7 +1978,7 @@ public final class System {
|
||||
private static void setJavaLangAccess() {
|
||||
// Allow privileged classes outside of java.lang
|
||||
SharedSecrets.setJavaLangAccess(new JavaLangAccess(){
|
||||
public sun.reflect.ConstantPool getConstantPool(Class<?> klass) {
|
||||
public jdk.internal.reflect.ConstantPool getConstantPool(Class<?> klass) {
|
||||
return klass.getConstantPool();
|
||||
}
|
||||
public boolean casAnnotationType(Class<?> klass, AnnotationType oldType, AnnotationType newType) {
|
||||
|
@ -37,8 +37,8 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.ConcurrentMap;
|
||||
import java.util.concurrent.locks.LockSupport;
|
||||
import sun.nio.ch.Interruptible;
|
||||
import sun.reflect.CallerSensitive;
|
||||
import sun.reflect.Reflection;
|
||||
import jdk.internal.reflect.CallerSensitive;
|
||||
import jdk.internal.reflect.Reflection;
|
||||
import sun.security.util.SecurityConstants;
|
||||
import jdk.internal.HotSpotIntrinsicCandidate;
|
||||
|
||||
|
@ -33,13 +33,13 @@ import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.function.Function;
|
||||
|
||||
import jdk.internal.reflect.CallerSensitive;
|
||||
import jdk.internal.reflect.Reflection;
|
||||
import jdk.internal.vm.annotation.Stable;
|
||||
import sun.invoke.empty.Empty;
|
||||
import sun.invoke.util.ValueConversions;
|
||||
import sun.invoke.util.VerifyType;
|
||||
import sun.invoke.util.Wrapper;
|
||||
import sun.reflect.CallerSensitive;
|
||||
import sun.reflect.Reflection;
|
||||
import static java.lang.invoke.LambdaForm.*;
|
||||
import static java.lang.invoke.MethodHandleStatics.*;
|
||||
import static java.lang.invoke.MethodHandles.Lookup.IMPL_LOOKUP;
|
||||
|
@ -30,8 +30,8 @@ import java.security.AccessController;
|
||||
import java.security.PrivilegedAction;
|
||||
import sun.invoke.WrapperInstance;
|
||||
import java.util.ArrayList;
|
||||
import sun.reflect.CallerSensitive;
|
||||
import sun.reflect.Reflection;
|
||||
import jdk.internal.reflect.CallerSensitive;
|
||||
import jdk.internal.reflect.Reflection;
|
||||
import sun.reflect.misc.ReflectUtil;
|
||||
import static java.lang.invoke.MethodHandleStatics.*;
|
||||
|
||||
|
@ -37,8 +37,8 @@ import java.security.PrivilegedAction;
|
||||
import sun.invoke.util.ValueConversions;
|
||||
import sun.invoke.util.VerifyAccess;
|
||||
import sun.invoke.util.Wrapper;
|
||||
import sun.reflect.CallerSensitive;
|
||||
import sun.reflect.Reflection;
|
||||
import jdk.internal.reflect.CallerSensitive;
|
||||
import jdk.internal.reflect.Reflection;
|
||||
import sun.reflect.misc.ReflectUtil;
|
||||
import sun.security.util.SecurityConstants;
|
||||
import java.lang.invoke.LambdaForm.BasicType;
|
||||
|
@ -27,9 +27,9 @@ package java.lang.reflect;
|
||||
|
||||
import java.security.AccessController;
|
||||
|
||||
import sun.reflect.CallerSensitive;
|
||||
import sun.reflect.Reflection;
|
||||
import sun.reflect.ReflectionFactory;
|
||||
import jdk.internal.reflect.CallerSensitive;
|
||||
import jdk.internal.reflect.Reflection;
|
||||
import jdk.internal.reflect.ReflectionFactory;
|
||||
import java.lang.annotation.Annotation;
|
||||
|
||||
/**
|
||||
@ -230,7 +230,7 @@ public class AccessibleObject implements AnnotatedElement {
|
||||
// very early in the bootstrapping process.
|
||||
static final ReflectionFactory reflectionFactory =
|
||||
AccessController.doPrivileged(
|
||||
new sun.reflect.ReflectionFactory.GetReflectionFactoryAction());
|
||||
new ReflectionFactory.GetReflectionFactoryAction());
|
||||
|
||||
/**
|
||||
* @throws NullPointerException {@inheritDoc}
|
||||
|
@ -26,9 +26,9 @@
|
||||
package java.lang.reflect;
|
||||
|
||||
import jdk.internal.misc.SharedSecrets;
|
||||
import sun.reflect.CallerSensitive;
|
||||
import sun.reflect.ConstructorAccessor;
|
||||
import sun.reflect.Reflection;
|
||||
import jdk.internal.reflect.CallerSensitive;
|
||||
import jdk.internal.reflect.ConstructorAccessor;
|
||||
import jdk.internal.reflect.Reflection;
|
||||
import sun.reflect.annotation.TypeAnnotation;
|
||||
import sun.reflect.annotation.TypeAnnotationParser;
|
||||
import sun.reflect.generics.repository.ConstructorRepository;
|
||||
|
@ -26,9 +26,9 @@
|
||||
package java.lang.reflect;
|
||||
|
||||
import jdk.internal.misc.SharedSecrets;
|
||||
import sun.reflect.CallerSensitive;
|
||||
import sun.reflect.FieldAccessor;
|
||||
import sun.reflect.Reflection;
|
||||
import jdk.internal.reflect.CallerSensitive;
|
||||
import jdk.internal.reflect.FieldAccessor;
|
||||
import jdk.internal.reflect.Reflection;
|
||||
import sun.reflect.generics.repository.FieldRepository;
|
||||
import sun.reflect.generics.factory.CoreReflectionFactory;
|
||||
import sun.reflect.generics.factory.GenericsFactory;
|
||||
|
@ -27,9 +27,9 @@ package java.lang.reflect;
|
||||
|
||||
import jdk.internal.HotSpotIntrinsicCandidate;
|
||||
import jdk.internal.misc.SharedSecrets;
|
||||
import sun.reflect.CallerSensitive;
|
||||
import sun.reflect.MethodAccessor;
|
||||
import sun.reflect.Reflection;
|
||||
import jdk.internal.reflect.CallerSensitive;
|
||||
import jdk.internal.reflect.MethodAccessor;
|
||||
import jdk.internal.reflect.Reflection;
|
||||
import sun.reflect.generics.repository.MethodRepository;
|
||||
import sun.reflect.generics.factory.CoreReflectionFactory;
|
||||
import sun.reflect.generics.factory.GenericsFactory;
|
||||
|
@ -27,8 +27,8 @@ package java.lang.reflect;
|
||||
|
||||
import java.security.AccessController;
|
||||
import java.util.StringJoiner;
|
||||
import sun.reflect.LangReflectAccess;
|
||||
import sun.reflect.ReflectionFactory;
|
||||
import jdk.internal.reflect.LangReflectAccess;
|
||||
import jdk.internal.reflect.ReflectionFactory;
|
||||
|
||||
/**
|
||||
* The Modifier class provides {@code static} methods and
|
||||
@ -51,8 +51,7 @@ public class Modifier {
|
||||
* packages
|
||||
*/
|
||||
static {
|
||||
sun.reflect.ReflectionFactory factory =
|
||||
AccessController.doPrivileged(
|
||||
ReflectionFactory factory = AccessController.doPrivileged(
|
||||
new ReflectionFactory.GetReflectionFactoryAction());
|
||||
factory.setLangReflectAccess(new java.lang.reflect.ReflectAccess());
|
||||
}
|
||||
|
@ -56,8 +56,8 @@ import jdk.internal.loader.BootLoader;
|
||||
import jdk.internal.misc.JavaLangReflectModuleAccess;
|
||||
import jdk.internal.misc.SharedSecrets;
|
||||
import jdk.internal.module.ServicesCatalog;
|
||||
import sun.reflect.CallerSensitive;
|
||||
import sun.reflect.Reflection;
|
||||
import jdk.internal.reflect.CallerSensitive;
|
||||
import jdk.internal.reflect.Reflection;
|
||||
import sun.security.util.SecurityConstants;
|
||||
|
||||
/**
|
||||
|
@ -47,8 +47,8 @@ import jdk.internal.loader.BootLoader;
|
||||
import jdk.internal.module.Modules;
|
||||
import jdk.internal.misc.Unsafe;
|
||||
import jdk.internal.misc.VM;
|
||||
import sun.reflect.CallerSensitive;
|
||||
import sun.reflect.Reflection;
|
||||
import jdk.internal.reflect.CallerSensitive;
|
||||
import jdk.internal.reflect.Reflection;
|
||||
import sun.reflect.misc.ReflectUtil;
|
||||
import sun.security.util.SecurityConstants;
|
||||
|
||||
|
@ -25,14 +25,14 @@
|
||||
|
||||
package java.lang.reflect;
|
||||
|
||||
import sun.reflect.MethodAccessor;
|
||||
import sun.reflect.ConstructorAccessor;
|
||||
import jdk.internal.reflect.MethodAccessor;
|
||||
import jdk.internal.reflect.ConstructorAccessor;
|
||||
|
||||
/** Package-private class implementing the
|
||||
sun.reflect.LangReflectAccess interface, allowing the java.lang
|
||||
package to instantiate objects in this package. */
|
||||
|
||||
class ReflectAccess implements sun.reflect.LangReflectAccess {
|
||||
class ReflectAccess implements jdk.internal.reflect.LangReflectAccess {
|
||||
public Field newField(Class<?> declaringClass,
|
||||
String name,
|
||||
Class<?> type,
|
||||
|
@ -894,19 +894,17 @@ class InetAddress implements java.io.Serializable {
|
||||
*/
|
||||
private static final class PlatformNameService implements NameService {
|
||||
|
||||
public InetAddress[] lookupAllHostAddr(String host)
|
||||
throws UnknownHostException {
|
||||
|
||||
return impl.lookupAllHostAddr(host);
|
||||
|
||||
}
|
||||
|
||||
public String getHostByAddr(byte[] addr) throws UnknownHostException {
|
||||
|
||||
return impl.getHostByAddr(addr);
|
||||
|
||||
public InetAddress[] lookupAllHostAddr(String host)
|
||||
throws UnknownHostException
|
||||
{
|
||||
return impl.lookupAllHostAddr(host);
|
||||
}
|
||||
|
||||
public String getHostByAddr(byte[] addr)
|
||||
throws UnknownHostException
|
||||
{
|
||||
return impl.getHostByAddr(addr);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -991,7 +989,6 @@ class InetAddress implements java.io.Serializable {
|
||||
return host;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* <p>Lookup a host mapping by name. Retrieve the IP addresses
|
||||
* associated with a host.
|
||||
@ -1004,7 +1001,6 @@ class InetAddress implements java.io.Serializable {
|
||||
* @throws UnknownHostException
|
||||
* if no IP address for the {@code host} could be found
|
||||
*/
|
||||
|
||||
public InetAddress[] lookupAllHostAddr(String host)
|
||||
throws UnknownHostException {
|
||||
String hostEntry;
|
||||
|
@ -26,8 +26,8 @@
|
||||
package java.security;
|
||||
|
||||
import sun.security.util.Debug;
|
||||
import sun.reflect.CallerSensitive;
|
||||
import sun.reflect.Reflection;
|
||||
import jdk.internal.reflect.CallerSensitive;
|
||||
import jdk.internal.reflect.Reflection;
|
||||
|
||||
/**
|
||||
* <p> The AccessController class is used for access control operations
|
||||
|
@ -64,8 +64,8 @@ import java.util.spi.ResourceBundleProvider;
|
||||
|
||||
import jdk.internal.misc.JavaUtilResourceBundleAccess;
|
||||
import jdk.internal.misc.SharedSecrets;
|
||||
import sun.reflect.CallerSensitive;
|
||||
import sun.reflect.Reflection;
|
||||
import jdk.internal.reflect.CallerSensitive;
|
||||
import jdk.internal.reflect.Reflection;
|
||||
import sun.util.locale.BaseLocale;
|
||||
import sun.util.locale.LocaleObjectCache;
|
||||
import sun.util.locale.provider.ResourceBundleProviderSupport;
|
||||
|
@ -51,8 +51,8 @@ import jdk.internal.misc.VM;
|
||||
import jdk.internal.module.ServicesCatalog;
|
||||
import jdk.internal.module.ServicesCatalog.ServiceProvider;
|
||||
|
||||
import sun.reflect.CallerSensitive;
|
||||
import sun.reflect.Reflection;
|
||||
import jdk.internal.reflect.CallerSensitive;
|
||||
import jdk.internal.reflect.Reflection;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -42,8 +42,8 @@ import java.security.PrivilegedActionException;
|
||||
import java.security.PrivilegedExceptionAction;
|
||||
import java.util.function.IntBinaryOperator;
|
||||
import java.util.function.IntUnaryOperator;
|
||||
import sun.reflect.CallerSensitive;
|
||||
import sun.reflect.Reflection;
|
||||
import jdk.internal.reflect.CallerSensitive;
|
||||
import jdk.internal.reflect.Reflection;
|
||||
|
||||
/**
|
||||
* A reflection-based utility that enables atomic updates to
|
||||
|
@ -42,8 +42,8 @@ import java.security.PrivilegedActionException;
|
||||
import java.security.PrivilegedExceptionAction;
|
||||
import java.util.function.LongBinaryOperator;
|
||||
import java.util.function.LongUnaryOperator;
|
||||
import sun.reflect.CallerSensitive;
|
||||
import sun.reflect.Reflection;
|
||||
import jdk.internal.reflect.CallerSensitive;
|
||||
import jdk.internal.reflect.Reflection;
|
||||
|
||||
/**
|
||||
* A reflection-based utility that enables atomic updates to
|
||||
|
@ -42,8 +42,8 @@ import java.security.PrivilegedActionException;
|
||||
import java.security.PrivilegedExceptionAction;
|
||||
import java.util.function.BinaryOperator;
|
||||
import java.util.function.UnaryOperator;
|
||||
import sun.reflect.CallerSensitive;
|
||||
import sun.reflect.Reflection;
|
||||
import jdk.internal.reflect.CallerSensitive;
|
||||
import jdk.internal.reflect.Reflection;
|
||||
|
||||
/**
|
||||
* A reflection-based utility that enables atomic updates to
|
||||
|
@ -37,7 +37,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import jdk.internal.module.ServicesCatalog;
|
||||
import sun.reflect.ConstantPool;
|
||||
import jdk.internal.reflect.ConstantPool;
|
||||
import sun.reflect.annotation.AnnotationType;
|
||||
import sun.nio.ch.Interruptible;
|
||||
|
||||
|
@ -28,8 +28,8 @@ package jdk.internal.misc;
|
||||
import java.lang.reflect.Field;
|
||||
import java.security.ProtectionDomain;
|
||||
|
||||
import sun.reflect.CallerSensitive;
|
||||
import sun.reflect.Reflection;
|
||||
import jdk.internal.reflect.CallerSensitive;
|
||||
import jdk.internal.reflect.Reflection;
|
||||
import jdk.internal.misc.VM;
|
||||
|
||||
import jdk.internal.HotSpotIntrinsicCandidate;
|
||||
@ -58,7 +58,7 @@ public final class Unsafe {
|
||||
private static native void registerNatives();
|
||||
static {
|
||||
registerNatives();
|
||||
sun.reflect.Reflection.registerMethodsToFilter(Unsafe.class, "getUnsafe");
|
||||
Reflection.registerMethodsToFilter(Unsafe.class, "getUnsafe");
|
||||
}
|
||||
|
||||
private Unsafe() {}
|
||||
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.reflect;
|
||||
package jdk.internal.reflect;
|
||||
|
||||
import java.lang.reflect.*;
|
||||
import jdk.internal.misc.Unsafe;
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.reflect;
|
||||
package jdk.internal.reflect;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Constructor;
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.reflect;
|
||||
package jdk.internal.reflect;
|
||||
|
||||
/** A growable array of bytes. */
|
||||
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.reflect;
|
||||
package jdk.internal.reflect;
|
||||
|
||||
class ByteVectorFactory {
|
||||
static ByteVector create() {
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.reflect;
|
||||
package jdk.internal.reflect;
|
||||
|
||||
class ByteVectorImpl implements ByteVector {
|
||||
private byte[] data;
|
@ -23,14 +23,14 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.reflect;
|
||||
package jdk.internal.reflect;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
import static java.lang.annotation.ElementType.*;
|
||||
|
||||
/**
|
||||
* A method annotated @CallerSensitive is sensitive to its calling class,
|
||||
* via {@link sun.reflect.Reflection#getCallerClass Reflection.getCallerClass},
|
||||
* via {@link jdk.internal.reflect.Reflection#getCallerClass Reflection.getCallerClass},
|
||||
* or via some equivalent.
|
||||
*
|
||||
* @author John R. Rose
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.reflect;
|
||||
package jdk.internal.reflect;
|
||||
|
||||
import java.security.AccessController;
|
||||
import java.security.PrivilegedAction;
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.reflect;
|
||||
package jdk.internal.reflect;
|
||||
|
||||
class ClassFileAssembler implements ClassFileConstants {
|
||||
private ByteVector vec;
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.reflect;
|
||||
package jdk.internal.reflect;
|
||||
|
||||
/** Minimal set of class file constants for assembly of field and
|
||||
method accessors. */
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.reflect;
|
||||
package jdk.internal.reflect;
|
||||
|
||||
import java.lang.reflect.*;
|
||||
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.reflect;
|
||||
package jdk.internal.reflect;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.reflect;
|
||||
package jdk.internal.reflect;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.reflect;
|
||||
package jdk.internal.reflect;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.reflect;
|
||||
package jdk.internal.reflect;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.reflect;
|
||||
package jdk.internal.reflect;
|
||||
|
||||
/** This interface provides the declarations for the accessor methods
|
||||
of java.lang.reflect.Field. Each Field object is configured with a
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.reflect;
|
||||
package jdk.internal.reflect;
|
||||
|
||||
/** Package-private implementation of the FieldAccessor interface
|
||||
which has access to all classes and all fields, regardless of
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.reflect;
|
||||
package jdk.internal.reflect;
|
||||
|
||||
import java.lang.reflect.Constructor;
|
||||
import java.lang.reflect.InvocationTargetException;
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.reflect;
|
||||
package jdk.internal.reflect;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.reflect;
|
||||
package jdk.internal.reflect;
|
||||
|
||||
import java.lang.reflect.*;
|
||||
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.reflect;
|
||||
package jdk.internal.reflect;
|
||||
|
||||
/** <P> MagicAccessorImpl (named for parity with FieldAccessorImpl and
|
||||
others, not because it actually implements an interface) is a
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.reflect;
|
||||
package jdk.internal.reflect;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.reflect;
|
||||
package jdk.internal.reflect;
|
||||
|
||||
import java.security.AccessController;
|
||||
import java.security.PrivilegedAction;
|
||||
@ -148,7 +148,7 @@ class MethodAccessorGenerator extends AccessorGenerator {
|
||||
// (^ = Only present if generating SerializationConstructorAccessor)
|
||||
// [UTF-8] [This class's name]
|
||||
// [CONSTANT_Class_info] for above
|
||||
// [UTF-8] "sun/reflect/{MethodAccessorImpl,ConstructorAccessorImpl,SerializationConstructorAccessorImpl}"
|
||||
// [UTF-8] "jdk/internal/reflect/{MethodAccessorImpl,ConstructorAccessorImpl,SerializationConstructorAccessorImpl}"
|
||||
// [CONSTANT_Class_info] for above
|
||||
// [UTF-8] [Target class's name]
|
||||
// [CONSTANT_Class_info] for above
|
||||
@ -290,12 +290,12 @@ class MethodAccessorGenerator extends AccessorGenerator {
|
||||
if (isConstructor) {
|
||||
if (forSerialization) {
|
||||
asm.emitConstantPoolUTF8
|
||||
("sun/reflect/SerializationConstructorAccessorImpl");
|
||||
("jdk/internal/reflect/SerializationConstructorAccessorImpl");
|
||||
} else {
|
||||
asm.emitConstantPoolUTF8("sun/reflect/ConstructorAccessorImpl");
|
||||
asm.emitConstantPoolUTF8("jdk/internal/reflect/ConstructorAccessorImpl");
|
||||
}
|
||||
} else {
|
||||
asm.emitConstantPoolUTF8("sun/reflect/MethodAccessorImpl");
|
||||
asm.emitConstantPoolUTF8("jdk/internal/reflect/MethodAccessorImpl");
|
||||
}
|
||||
asm.emitConstantPoolClass(asm.cpi());
|
||||
superClass = asm.cpi();
|
||||
@ -767,14 +767,14 @@ class MethodAccessorGenerator extends AccessorGenerator {
|
||||
if (isConstructor) {
|
||||
if (forSerialization) {
|
||||
int num = ++serializationConstructorSymnum;
|
||||
return "sun/reflect/GeneratedSerializationConstructorAccessor" + num;
|
||||
return "jdk/internal/reflect/GeneratedSerializationConstructorAccessor" + num;
|
||||
} else {
|
||||
int num = ++constructorSymnum;
|
||||
return "sun/reflect/GeneratedConstructorAccessor" + num;
|
||||
return "jdk/internal/reflect/GeneratedConstructorAccessor" + num;
|
||||
}
|
||||
} else {
|
||||
int num = ++methodSymnum;
|
||||
return "sun/reflect/GeneratedMethodAccessor" + num;
|
||||
return "jdk/internal/reflect/GeneratedMethodAccessor" + num;
|
||||
}
|
||||
}
|
||||
}
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.reflect;
|
||||
package jdk.internal.reflect;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.reflect;
|
||||
package jdk.internal.reflect;
|
||||
|
||||
import java.lang.reflect.*;
|
||||
import sun.reflect.misc.ReflectUtil;
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.reflect;
|
||||
package jdk.internal.reflect;
|
||||
|
||||
import java.lang.reflect.*;
|
||||
import sun.reflect.misc.ReflectUtil;
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.reflect;
|
||||
package jdk.internal.reflect;
|
||||
|
||||
|
||||
import java.lang.reflect.*;
|
||||
@ -66,11 +66,11 @@ public class Reflection {
|
||||
public static native Class<?> getCallerClass();
|
||||
|
||||
/**
|
||||
* @deprecated This method will be removed in JDK 9.
|
||||
* This method is a private JDK API and retained temporarily for
|
||||
* existing code to run until a replacement API is defined.
|
||||
* @deprecated This method will be removed.
|
||||
* This method is a private JDK API and retained temporarily to
|
||||
* simplify the implementation of sun.misc.Reflection.getCallerClass.
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(forRemoval=true)
|
||||
public static native Class<?> getCallerClass(int depth);
|
||||
|
||||
/** Retrieves the access flags written to the class file. For
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.reflect;
|
||||
package jdk.internal.reflect;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Executable;
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.reflect;
|
||||
package jdk.internal.reflect;
|
||||
|
||||
/** <P> Java serialization (in java.io) expects to be able to
|
||||
instantiate a class and invoke a no-arg constructor of that
|
@ -23,11 +23,11 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.reflect;
|
||||
package jdk.internal.reflect;
|
||||
|
||||
/** Assists in iterating down a method's signature */
|
||||
|
||||
public class SignatureIterator {
|
||||
class SignatureIterator {
|
||||
private final String sig;
|
||||
private int idx;
|
||||
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.reflect;
|
||||
package jdk.internal.reflect;
|
||||
|
||||
/** It is necessary to use a "bootstrap" UTF-8 encoder for encoding
|
||||
constant pool entries because the character set converters rely on
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.reflect;
|
||||
package jdk.internal.reflect;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.reflect;
|
||||
package jdk.internal.reflect;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.reflect;
|
||||
package jdk.internal.reflect;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.reflect;
|
||||
package jdk.internal.reflect;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.reflect;
|
||||
package jdk.internal.reflect;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Modifier;
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.reflect;
|
||||
package jdk.internal.reflect;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Modifier;
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.reflect;
|
||||
package jdk.internal.reflect;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.reflect;
|
||||
package jdk.internal.reflect;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.reflect;
|
||||
package jdk.internal.reflect;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.reflect;
|
||||
package jdk.internal.reflect;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.reflect;
|
||||
package jdk.internal.reflect;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.reflect;
|
||||
package jdk.internal.reflect;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.reflect;
|
||||
package jdk.internal.reflect;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.reflect;
|
||||
package jdk.internal.reflect;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.reflect;
|
||||
package jdk.internal.reflect;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Modifier;
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.reflect;
|
||||
package jdk.internal.reflect;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.reflect;
|
||||
package jdk.internal.reflect;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.reflect;
|
||||
package jdk.internal.reflect;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.reflect;
|
||||
package jdk.internal.reflect;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.reflect;
|
||||
package jdk.internal.reflect;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.reflect;
|
||||
package jdk.internal.reflect;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.reflect;
|
||||
package jdk.internal.reflect;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.reflect;
|
||||
package jdk.internal.reflect;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.reflect;
|
||||
package jdk.internal.reflect;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.reflect;
|
||||
package jdk.internal.reflect;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Modifier;
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.reflect;
|
||||
package jdk.internal.reflect;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.reflect;
|
||||
package jdk.internal.reflect;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.reflect;
|
||||
package jdk.internal.reflect;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.reflect;
|
||||
package jdk.internal.reflect;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.reflect;
|
||||
package jdk.internal.reflect;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.reflect;
|
||||
package jdk.internal.reflect;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.reflect;
|
||||
package jdk.internal.reflect;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.reflect;
|
||||
package jdk.internal.reflect;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.reflect;
|
||||
package jdk.internal.reflect;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.reflect;
|
||||
package jdk.internal.reflect;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.reflect;
|
||||
package jdk.internal.reflect;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Modifier;
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.reflect;
|
||||
package jdk.internal.reflect;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.reflect;
|
||||
package jdk.internal.reflect;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user