8137058: Clear out all non-Critical APIs from sun.reflect

Reviewed-by: alanb, jfranck, mchung
This commit is contained in:
Chris Hegarty 2016-04-15 16:19:15 +01:00
parent d18a7a70c9
commit 07cdc33e34
141 changed files with 604 additions and 380 deletions

View file

@ -237,32 +237,32 @@ SUNWprivate_1.1 {
Java_jdk_internal_misc_Signal_findSignal0; Java_jdk_internal_misc_Signal_findSignal0;
Java_jdk_internal_misc_Signal_handle0; Java_jdk_internal_misc_Signal_handle0;
Java_jdk_internal_misc_Signal_raise0; Java_jdk_internal_misc_Signal_raise0;
Java_sun_reflect_ConstantPool_getClassAt0; Java_jdk_internal_reflect_ConstantPool_getClassAt0;
Java_sun_reflect_ConstantPool_getClassAtIfLoaded0; Java_jdk_internal_reflect_ConstantPool_getClassAtIfLoaded0;
Java_sun_reflect_ConstantPool_getClassRefIndexAt0; Java_jdk_internal_reflect_ConstantPool_getClassRefIndexAt0;
Java_sun_reflect_ConstantPool_getDoubleAt0; Java_jdk_internal_reflect_ConstantPool_getDoubleAt0;
Java_sun_reflect_ConstantPool_getFieldAt0; Java_jdk_internal_reflect_ConstantPool_getFieldAt0;
Java_sun_reflect_ConstantPool_getFieldAtIfLoaded0; Java_jdk_internal_reflect_ConstantPool_getFieldAtIfLoaded0;
Java_sun_reflect_ConstantPool_getFloatAt0; Java_jdk_internal_reflect_ConstantPool_getFloatAt0;
Java_sun_reflect_ConstantPool_getIntAt0; Java_jdk_internal_reflect_ConstantPool_getIntAt0;
Java_sun_reflect_ConstantPool_getLongAt0; Java_jdk_internal_reflect_ConstantPool_getLongAt0;
Java_sun_reflect_ConstantPool_getMemberRefInfoAt0; Java_jdk_internal_reflect_ConstantPool_getMemberRefInfoAt0;
Java_sun_reflect_ConstantPool_getMethodAt0; Java_jdk_internal_reflect_ConstantPool_getMethodAt0;
Java_sun_reflect_ConstantPool_getMethodAtIfLoaded0; Java_jdk_internal_reflect_ConstantPool_getMethodAtIfLoaded0;
Java_sun_reflect_ConstantPool_getNameAndTypeRefIndexAt0; Java_jdk_internal_reflect_ConstantPool_getNameAndTypeRefIndexAt0;
Java_sun_reflect_ConstantPool_getNameAndTypeRefInfoAt0; Java_jdk_internal_reflect_ConstantPool_getNameAndTypeRefInfoAt0;
Java_sun_reflect_ConstantPool_getSize0; Java_jdk_internal_reflect_ConstantPool_getSize0;
Java_sun_reflect_ConstantPool_getStringAt0; Java_jdk_internal_reflect_ConstantPool_getStringAt0;
Java_sun_reflect_ConstantPool_getTagAt0; Java_jdk_internal_reflect_ConstantPool_getTagAt0;
Java_sun_reflect_ConstantPool_getUTF8At0; Java_jdk_internal_reflect_ConstantPool_getUTF8At0;
Java_java_io_Console_istty; Java_java_io_Console_istty;
Java_java_io_Console_encoding; Java_java_io_Console_encoding;
Java_java_io_Console_echo; Java_java_io_Console_echo;
Java_sun_reflect_NativeConstructorAccessorImpl_newInstance0; Java_jdk_internal_reflect_NativeConstructorAccessorImpl_newInstance0;
Java_sun_reflect_NativeMethodAccessorImpl_invoke0; Java_jdk_internal_reflect_NativeMethodAccessorImpl_invoke0;
Java_sun_reflect_Reflection_getCallerClass__; Java_jdk_internal_reflect_Reflection_getCallerClass__;
Java_sun_reflect_Reflection_getCallerClass__I; Java_jdk_internal_reflect_Reflection_getCallerClass__I;
Java_sun_reflect_Reflection_getClassAccessFlags; Java_jdk_internal_reflect_Reflection_getClassAccessFlags;
Java_jdk_internal_misc_VM_latestUserDefinedLoader; Java_jdk_internal_misc_VM_latestUserDefinedLoader;
Java_jdk_internal_misc_VM_getuid; Java_jdk_internal_misc_VM_getuid;
Java_jdk_internal_misc_VM_geteuid; Java_jdk_internal_misc_VM_geteuid;

View file

@ -49,9 +49,9 @@ import java.util.Set;
import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap; import java.util.concurrent.ConcurrentMap;
import jdk.internal.misc.Unsafe; import jdk.internal.misc.Unsafe;
import sun.reflect.CallerSensitive; import jdk.internal.reflect.CallerSensitive;
import sun.reflect.Reflection; import jdk.internal.reflect.Reflection;
import sun.reflect.ReflectionFactory; import jdk.internal.reflect.ReflectionFactory;
import sun.reflect.misc.ReflectUtil; import sun.reflect.misc.ReflectUtil;
import static java.io.ObjectStreamField.*; import static java.io.ObjectStreamField.*;

View file

@ -26,8 +26,8 @@
package java.io; package java.io;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import sun.reflect.CallerSensitive; import jdk.internal.reflect.CallerSensitive;
import sun.reflect.Reflection; import jdk.internal.reflect.Reflection;
import sun.reflect.misc.ReflectUtil; import sun.reflect.misc.ReflectUtil;
/** /**

View file

@ -66,10 +66,10 @@ import jdk.internal.loader.BootLoader;
import jdk.internal.loader.BuiltinClassLoader; import jdk.internal.loader.BuiltinClassLoader;
import jdk.internal.misc.Unsafe; import jdk.internal.misc.Unsafe;
import jdk.internal.misc.VM; import jdk.internal.misc.VM;
import sun.reflect.CallerSensitive; import jdk.internal.reflect.CallerSensitive;
import sun.reflect.ConstantPool; import jdk.internal.reflect.ConstantPool;
import sun.reflect.Reflection; import jdk.internal.reflect.Reflection;
import sun.reflect.ReflectionFactory; import jdk.internal.reflect.ReflectionFactory;
import sun.reflect.generics.factory.CoreReflectionFactory; import sun.reflect.generics.factory.CoreReflectionFactory;
import sun.reflect.generics.factory.GenericsFactory; import sun.reflect.generics.factory.GenericsFactory;
import sun.reflect.generics.repository.ClassRepository; import sun.reflect.generics.repository.ClassRepository;
@ -3473,7 +3473,7 @@ public final class Class<T> implements java.io.Serializable,
if (reflectionFactory == null) { if (reflectionFactory == null) {
reflectionFactory = reflectionFactory =
java.security.AccessController.doPrivileged java.security.AccessController.doPrivileged
(new sun.reflect.ReflectionFactory.GetReflectionFactoryAction()); (new ReflectionFactory.GetReflectionFactoryAction());
} }
return reflectionFactory; return reflectionFactory;
} }

View file

@ -60,8 +60,8 @@ import jdk.internal.loader.ClassLoaders;
import jdk.internal.misc.SharedSecrets; import jdk.internal.misc.SharedSecrets;
import jdk.internal.misc.Unsafe; import jdk.internal.misc.Unsafe;
import jdk.internal.misc.VM; import jdk.internal.misc.VM;
import sun.reflect.CallerSensitive; import jdk.internal.reflect.CallerSensitive;
import sun.reflect.Reflection; import jdk.internal.reflect.Reflection;
import sun.reflect.misc.ReflectUtil; import sun.reflect.misc.ReflectUtil;
import sun.security.util.SecurityConstants; import sun.security.util.SecurityConstants;

View file

@ -36,8 +36,8 @@ import java.security.PrivilegedAction;
import java.util.Objects; import java.util.Objects;
import jdk.internal.loader.BootLoader; import jdk.internal.loader.BootLoader;
import sun.reflect.CallerSensitive; import jdk.internal.reflect.CallerSensitive;
import sun.reflect.Reflection; import jdk.internal.reflect.Reflection;
/** /**

View file

@ -27,8 +27,8 @@ package java.lang;
import java.io.*; import java.io.*;
import java.util.StringTokenizer; import java.util.StringTokenizer;
import sun.reflect.CallerSensitive; import jdk.internal.reflect.CallerSensitive;
import sun.reflect.Reflection; import jdk.internal.reflect.Reflection;
/** /**
* Every Java application has a single instance of class * Every Java application has a single instance of class

View file

@ -38,7 +38,7 @@ import java.net.InetAddress;
import java.lang.reflect.*; import java.lang.reflect.*;
import java.net.URL; import java.net.URL;
import sun.reflect.CallerSensitive; import jdk.internal.reflect.CallerSensitive;
import sun.security.util.SecurityConstants; import sun.security.util.SecurityConstants;
/** /**

View file

@ -25,6 +25,7 @@
package java.lang; package java.lang;
import jdk.internal.misc.VM; import jdk.internal.misc.VM;
import jdk.internal.reflect.MethodAccessor;
import java.io.PrintStream; import java.io.PrintStream;
import java.lang.StackWalker.Option; import java.lang.StackWalker.Option;
@ -1081,13 +1082,13 @@ final class StackStreamFactory {
} }
private static boolean isReflectionFrame(Class<?> c) { private static boolean isReflectionFrame(Class<?> c) {
if (c.getName().startsWith("sun.reflect") && if (c.getName().startsWith("jdk.internal.reflect") &&
!sun.reflect.MethodAccessor.class.isAssignableFrom(c)) { !MethodAccessor.class.isAssignableFrom(c)) {
throw new InternalError("Not sun.reflect.MethodAccessor: " + c.toString()); throw new InternalError("Not jdk.internal.reflect.MethodAccessor: " + c.toString());
} }
// ## should filter all @Hidden frames? // ## should filter all @Hidden frames?
return c == Method.class || return c == Method.class ||
sun.reflect.MethodAccessor.class.isAssignableFrom(c) || MethodAccessor.class.isAssignableFrom(c) ||
c.getName().startsWith("java.lang.invoke.LambdaForm"); c.getName().startsWith("java.lang.invoke.LambdaForm");
} }

View file

@ -24,7 +24,7 @@
*/ */
package java.lang; package java.lang;
import sun.reflect.CallerSensitive; import jdk.internal.reflect.CallerSensitive;
import java.util.*; import java.util.*;
import java.util.function.Consumer; import java.util.function.Consumer;

View file

@ -56,8 +56,8 @@ import java.util.Objects;
import java.util.ResourceBundle; import java.util.ResourceBundle;
import java.util.function.Supplier; import java.util.function.Supplier;
import sun.nio.ch.Interruptible; import sun.nio.ch.Interruptible;
import sun.reflect.CallerSensitive; import jdk.internal.reflect.CallerSensitive;
import sun.reflect.Reflection; import jdk.internal.reflect.Reflection;
import sun.security.util.SecurityConstants; import sun.security.util.SecurityConstants;
import sun.reflect.annotation.AnnotationType; import sun.reflect.annotation.AnnotationType;
import jdk.internal.HotSpotIntrinsicCandidate; import jdk.internal.HotSpotIntrinsicCandidate;
@ -1978,7 +1978,7 @@ public final class System {
private static void setJavaLangAccess() { private static void setJavaLangAccess() {
// Allow privileged classes outside of java.lang // Allow privileged classes outside of java.lang
SharedSecrets.setJavaLangAccess(new JavaLangAccess(){ SharedSecrets.setJavaLangAccess(new JavaLangAccess(){
public sun.reflect.ConstantPool getConstantPool(Class<?> klass) { public jdk.internal.reflect.ConstantPool getConstantPool(Class<?> klass) {
return klass.getConstantPool(); return klass.getConstantPool();
} }
public boolean casAnnotationType(Class<?> klass, AnnotationType oldType, AnnotationType newType) { public boolean casAnnotationType(Class<?> klass, AnnotationType oldType, AnnotationType newType) {

View file

@ -37,8 +37,8 @@ import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap; import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.locks.LockSupport; import java.util.concurrent.locks.LockSupport;
import sun.nio.ch.Interruptible; import sun.nio.ch.Interruptible;
import sun.reflect.CallerSensitive; import jdk.internal.reflect.CallerSensitive;
import sun.reflect.Reflection; import jdk.internal.reflect.Reflection;
import sun.security.util.SecurityConstants; import sun.security.util.SecurityConstants;
import jdk.internal.HotSpotIntrinsicCandidate; import jdk.internal.HotSpotIntrinsicCandidate;

View file

@ -33,13 +33,13 @@ import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.function.Function; import java.util.function.Function;
import jdk.internal.reflect.CallerSensitive;
import jdk.internal.reflect.Reflection;
import jdk.internal.vm.annotation.Stable; import jdk.internal.vm.annotation.Stable;
import sun.invoke.empty.Empty; import sun.invoke.empty.Empty;
import sun.invoke.util.ValueConversions; import sun.invoke.util.ValueConversions;
import sun.invoke.util.VerifyType; import sun.invoke.util.VerifyType;
import sun.invoke.util.Wrapper; import sun.invoke.util.Wrapper;
import sun.reflect.CallerSensitive;
import sun.reflect.Reflection;
import static java.lang.invoke.LambdaForm.*; import static java.lang.invoke.LambdaForm.*;
import static java.lang.invoke.MethodHandleStatics.*; import static java.lang.invoke.MethodHandleStatics.*;
import static java.lang.invoke.MethodHandles.Lookup.IMPL_LOOKUP; import static java.lang.invoke.MethodHandles.Lookup.IMPL_LOOKUP;

View file

@ -30,8 +30,8 @@ import java.security.AccessController;
import java.security.PrivilegedAction; import java.security.PrivilegedAction;
import sun.invoke.WrapperInstance; import sun.invoke.WrapperInstance;
import java.util.ArrayList; import java.util.ArrayList;
import sun.reflect.CallerSensitive; import jdk.internal.reflect.CallerSensitive;
import sun.reflect.Reflection; import jdk.internal.reflect.Reflection;
import sun.reflect.misc.ReflectUtil; import sun.reflect.misc.ReflectUtil;
import static java.lang.invoke.MethodHandleStatics.*; import static java.lang.invoke.MethodHandleStatics.*;

View file

@ -37,8 +37,8 @@ import java.security.PrivilegedAction;
import sun.invoke.util.ValueConversions; import sun.invoke.util.ValueConversions;
import sun.invoke.util.VerifyAccess; import sun.invoke.util.VerifyAccess;
import sun.invoke.util.Wrapper; import sun.invoke.util.Wrapper;
import sun.reflect.CallerSensitive; import jdk.internal.reflect.CallerSensitive;
import sun.reflect.Reflection; import jdk.internal.reflect.Reflection;
import sun.reflect.misc.ReflectUtil; import sun.reflect.misc.ReflectUtil;
import sun.security.util.SecurityConstants; import sun.security.util.SecurityConstants;
import java.lang.invoke.LambdaForm.BasicType; import java.lang.invoke.LambdaForm.BasicType;

View file

@ -27,9 +27,9 @@ package java.lang.reflect;
import java.security.AccessController; import java.security.AccessController;
import sun.reflect.CallerSensitive; import jdk.internal.reflect.CallerSensitive;
import sun.reflect.Reflection; import jdk.internal.reflect.Reflection;
import sun.reflect.ReflectionFactory; import jdk.internal.reflect.ReflectionFactory;
import java.lang.annotation.Annotation; import java.lang.annotation.Annotation;
/** /**
@ -230,7 +230,7 @@ public class AccessibleObject implements AnnotatedElement {
// very early in the bootstrapping process. // very early in the bootstrapping process.
static final ReflectionFactory reflectionFactory = static final ReflectionFactory reflectionFactory =
AccessController.doPrivileged( AccessController.doPrivileged(
new sun.reflect.ReflectionFactory.GetReflectionFactoryAction()); new ReflectionFactory.GetReflectionFactoryAction());
/** /**
* @throws NullPointerException {@inheritDoc} * @throws NullPointerException {@inheritDoc}

View file

@ -26,9 +26,9 @@
package java.lang.reflect; package java.lang.reflect;
import jdk.internal.misc.SharedSecrets; import jdk.internal.misc.SharedSecrets;
import sun.reflect.CallerSensitive; import jdk.internal.reflect.CallerSensitive;
import sun.reflect.ConstructorAccessor; import jdk.internal.reflect.ConstructorAccessor;
import sun.reflect.Reflection; import jdk.internal.reflect.Reflection;
import sun.reflect.annotation.TypeAnnotation; import sun.reflect.annotation.TypeAnnotation;
import sun.reflect.annotation.TypeAnnotationParser; import sun.reflect.annotation.TypeAnnotationParser;
import sun.reflect.generics.repository.ConstructorRepository; import sun.reflect.generics.repository.ConstructorRepository;

View file

@ -26,9 +26,9 @@
package java.lang.reflect; package java.lang.reflect;
import jdk.internal.misc.SharedSecrets; import jdk.internal.misc.SharedSecrets;
import sun.reflect.CallerSensitive; import jdk.internal.reflect.CallerSensitive;
import sun.reflect.FieldAccessor; import jdk.internal.reflect.FieldAccessor;
import sun.reflect.Reflection; import jdk.internal.reflect.Reflection;
import sun.reflect.generics.repository.FieldRepository; import sun.reflect.generics.repository.FieldRepository;
import sun.reflect.generics.factory.CoreReflectionFactory; import sun.reflect.generics.factory.CoreReflectionFactory;
import sun.reflect.generics.factory.GenericsFactory; import sun.reflect.generics.factory.GenericsFactory;

View file

@ -27,9 +27,9 @@ package java.lang.reflect;
import jdk.internal.HotSpotIntrinsicCandidate; import jdk.internal.HotSpotIntrinsicCandidate;
import jdk.internal.misc.SharedSecrets; import jdk.internal.misc.SharedSecrets;
import sun.reflect.CallerSensitive; import jdk.internal.reflect.CallerSensitive;
import sun.reflect.MethodAccessor; import jdk.internal.reflect.MethodAccessor;
import sun.reflect.Reflection; import jdk.internal.reflect.Reflection;
import sun.reflect.generics.repository.MethodRepository; import sun.reflect.generics.repository.MethodRepository;
import sun.reflect.generics.factory.CoreReflectionFactory; import sun.reflect.generics.factory.CoreReflectionFactory;
import sun.reflect.generics.factory.GenericsFactory; import sun.reflect.generics.factory.GenericsFactory;

View file

@ -27,8 +27,8 @@ package java.lang.reflect;
import java.security.AccessController; import java.security.AccessController;
import java.util.StringJoiner; import java.util.StringJoiner;
import sun.reflect.LangReflectAccess; import jdk.internal.reflect.LangReflectAccess;
import sun.reflect.ReflectionFactory; import jdk.internal.reflect.ReflectionFactory;
/** /**
* The Modifier class provides {@code static} methods and * The Modifier class provides {@code static} methods and
@ -51,8 +51,7 @@ public class Modifier {
* packages * packages
*/ */
static { static {
sun.reflect.ReflectionFactory factory = ReflectionFactory factory = AccessController.doPrivileged(
AccessController.doPrivileged(
new ReflectionFactory.GetReflectionFactoryAction()); new ReflectionFactory.GetReflectionFactoryAction());
factory.setLangReflectAccess(new java.lang.reflect.ReflectAccess()); factory.setLangReflectAccess(new java.lang.reflect.ReflectAccess());
} }

View file

@ -56,8 +56,8 @@ import jdk.internal.loader.BootLoader;
import jdk.internal.misc.JavaLangReflectModuleAccess; import jdk.internal.misc.JavaLangReflectModuleAccess;
import jdk.internal.misc.SharedSecrets; import jdk.internal.misc.SharedSecrets;
import jdk.internal.module.ServicesCatalog; import jdk.internal.module.ServicesCatalog;
import sun.reflect.CallerSensitive; import jdk.internal.reflect.CallerSensitive;
import sun.reflect.Reflection; import jdk.internal.reflect.Reflection;
import sun.security.util.SecurityConstants; import sun.security.util.SecurityConstants;
/** /**

View file

@ -47,8 +47,8 @@ import jdk.internal.loader.BootLoader;
import jdk.internal.module.Modules; import jdk.internal.module.Modules;
import jdk.internal.misc.Unsafe; import jdk.internal.misc.Unsafe;
import jdk.internal.misc.VM; import jdk.internal.misc.VM;
import sun.reflect.CallerSensitive; import jdk.internal.reflect.CallerSensitive;
import sun.reflect.Reflection; import jdk.internal.reflect.Reflection;
import sun.reflect.misc.ReflectUtil; import sun.reflect.misc.ReflectUtil;
import sun.security.util.SecurityConstants; import sun.security.util.SecurityConstants;

View file

@ -25,14 +25,14 @@
package java.lang.reflect; package java.lang.reflect;
import sun.reflect.MethodAccessor; import jdk.internal.reflect.MethodAccessor;
import sun.reflect.ConstructorAccessor; import jdk.internal.reflect.ConstructorAccessor;
/** Package-private class implementing the /** Package-private class implementing the
sun.reflect.LangReflectAccess interface, allowing the java.lang sun.reflect.LangReflectAccess interface, allowing the java.lang
package to instantiate objects in this package. */ 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, public Field newField(Class<?> declaringClass,
String name, String name,
Class<?> type, Class<?> type,

View file

@ -894,19 +894,17 @@ class InetAddress implements java.io.Serializable {
*/ */
private static final class PlatformNameService implements NameService { private static final class PlatformNameService implements NameService {
public InetAddress[] lookupAllHostAddr(String host) public InetAddress[] lookupAllHostAddr(String host)
throws UnknownHostException { throws UnknownHostException
{
return impl.lookupAllHostAddr(host); return impl.lookupAllHostAddr(host);
}
public String getHostByAddr(byte[] addr) throws UnknownHostException {
return impl.getHostByAddr(addr);
} }
public String getHostByAddr(byte[] addr)
throws UnknownHostException
{
return impl.getHostByAddr(addr);
}
} }
/** /**
@ -991,7 +989,6 @@ class InetAddress implements java.io.Serializable {
return host; return host;
} }
/** /**
* <p>Lookup a host mapping by name. Retrieve the IP addresses * <p>Lookup a host mapping by name. Retrieve the IP addresses
* associated with a host. * associated with a host.
@ -1004,7 +1001,6 @@ class InetAddress implements java.io.Serializable {
* @throws UnknownHostException * @throws UnknownHostException
* if no IP address for the {@code host} could be found * if no IP address for the {@code host} could be found
*/ */
public InetAddress[] lookupAllHostAddr(String host) public InetAddress[] lookupAllHostAddr(String host)
throws UnknownHostException { throws UnknownHostException {
String hostEntry; String hostEntry;

View file

@ -26,8 +26,8 @@
package java.security; package java.security;
import sun.security.util.Debug; import sun.security.util.Debug;
import sun.reflect.CallerSensitive; import jdk.internal.reflect.CallerSensitive;
import sun.reflect.Reflection; import jdk.internal.reflect.Reflection;
/** /**
* <p> The AccessController class is used for access control operations * <p> The AccessController class is used for access control operations

View file

@ -64,8 +64,8 @@ import java.util.spi.ResourceBundleProvider;
import jdk.internal.misc.JavaUtilResourceBundleAccess; import jdk.internal.misc.JavaUtilResourceBundleAccess;
import jdk.internal.misc.SharedSecrets; import jdk.internal.misc.SharedSecrets;
import sun.reflect.CallerSensitive; import jdk.internal.reflect.CallerSensitive;
import sun.reflect.Reflection; import jdk.internal.reflect.Reflection;
import sun.util.locale.BaseLocale; import sun.util.locale.BaseLocale;
import sun.util.locale.LocaleObjectCache; import sun.util.locale.LocaleObjectCache;
import sun.util.locale.provider.ResourceBundleProviderSupport; import sun.util.locale.provider.ResourceBundleProviderSupport;

View file

@ -51,8 +51,8 @@ import jdk.internal.misc.VM;
import jdk.internal.module.ServicesCatalog; import jdk.internal.module.ServicesCatalog;
import jdk.internal.module.ServicesCatalog.ServiceProvider; import jdk.internal.module.ServicesCatalog.ServiceProvider;
import sun.reflect.CallerSensitive; import jdk.internal.reflect.CallerSensitive;
import sun.reflect.Reflection; import jdk.internal.reflect.Reflection;
/** /**

View file

@ -42,8 +42,8 @@ import java.security.PrivilegedActionException;
import java.security.PrivilegedExceptionAction; import java.security.PrivilegedExceptionAction;
import java.util.function.IntBinaryOperator; import java.util.function.IntBinaryOperator;
import java.util.function.IntUnaryOperator; import java.util.function.IntUnaryOperator;
import sun.reflect.CallerSensitive; import jdk.internal.reflect.CallerSensitive;
import sun.reflect.Reflection; import jdk.internal.reflect.Reflection;
/** /**
* A reflection-based utility that enables atomic updates to * A reflection-based utility that enables atomic updates to

View file

@ -42,8 +42,8 @@ import java.security.PrivilegedActionException;
import java.security.PrivilegedExceptionAction; import java.security.PrivilegedExceptionAction;
import java.util.function.LongBinaryOperator; import java.util.function.LongBinaryOperator;
import java.util.function.LongUnaryOperator; import java.util.function.LongUnaryOperator;
import sun.reflect.CallerSensitive; import jdk.internal.reflect.CallerSensitive;
import sun.reflect.Reflection; import jdk.internal.reflect.Reflection;
/** /**
* A reflection-based utility that enables atomic updates to * A reflection-based utility that enables atomic updates to

View file

@ -42,8 +42,8 @@ import java.security.PrivilegedActionException;
import java.security.PrivilegedExceptionAction; import java.security.PrivilegedExceptionAction;
import java.util.function.BinaryOperator; import java.util.function.BinaryOperator;
import java.util.function.UnaryOperator; import java.util.function.UnaryOperator;
import sun.reflect.CallerSensitive; import jdk.internal.reflect.CallerSensitive;
import sun.reflect.Reflection; import jdk.internal.reflect.Reflection;
/** /**
* A reflection-based utility that enables atomic updates to * A reflection-based utility that enables atomic updates to

View file

@ -37,7 +37,7 @@ import java.util.concurrent.ConcurrentHashMap;
import java.util.stream.Stream; import java.util.stream.Stream;
import jdk.internal.module.ServicesCatalog; import jdk.internal.module.ServicesCatalog;
import sun.reflect.ConstantPool; import jdk.internal.reflect.ConstantPool;
import sun.reflect.annotation.AnnotationType; import sun.reflect.annotation.AnnotationType;
import sun.nio.ch.Interruptible; import sun.nio.ch.Interruptible;

View file

@ -28,8 +28,8 @@ package jdk.internal.misc;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import java.security.ProtectionDomain; import java.security.ProtectionDomain;
import sun.reflect.CallerSensitive; import jdk.internal.reflect.CallerSensitive;
import sun.reflect.Reflection; import jdk.internal.reflect.Reflection;
import jdk.internal.misc.VM; import jdk.internal.misc.VM;
import jdk.internal.HotSpotIntrinsicCandidate; import jdk.internal.HotSpotIntrinsicCandidate;
@ -58,7 +58,7 @@ public final class Unsafe {
private static native void registerNatives(); private static native void registerNatives();
static { static {
registerNatives(); registerNatives();
sun.reflect.Reflection.registerMethodsToFilter(Unsafe.class, "getUnsafe"); Reflection.registerMethodsToFilter(Unsafe.class, "getUnsafe");
} }
private Unsafe() {} private Unsafe() {}

View file

@ -23,7 +23,7 @@
* questions. * questions.
*/ */
package sun.reflect; package jdk.internal.reflect;
import java.lang.reflect.*; import java.lang.reflect.*;
import jdk.internal.misc.Unsafe; import jdk.internal.misc.Unsafe;

View file

@ -23,7 +23,7 @@
* questions. * questions.
*/ */
package sun.reflect; package jdk.internal.reflect;
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Constructor; import java.lang.reflect.Constructor;

View file

@ -23,7 +23,7 @@
* questions. * questions.
*/ */
package sun.reflect; package jdk.internal.reflect;
/** A growable array of bytes. */ /** A growable array of bytes. */

View file

@ -23,7 +23,7 @@
* questions. * questions.
*/ */
package sun.reflect; package jdk.internal.reflect;
class ByteVectorFactory { class ByteVectorFactory {
static ByteVector create() { static ByteVector create() {

View file

@ -23,7 +23,7 @@
* questions. * questions.
*/ */
package sun.reflect; package jdk.internal.reflect;
class ByteVectorImpl implements ByteVector { class ByteVectorImpl implements ByteVector {
private byte[] data; private byte[] data;

View file

@ -23,14 +23,14 @@
* questions. * questions.
*/ */
package sun.reflect; package jdk.internal.reflect;
import java.lang.annotation.*; import java.lang.annotation.*;
import static java.lang.annotation.ElementType.*; import static java.lang.annotation.ElementType.*;
/** /**
* A method annotated @CallerSensitive is sensitive to its calling class, * 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. * or via some equivalent.
* *
* @author John R. Rose * @author John R. Rose

View file

@ -23,7 +23,7 @@
* questions. * questions.
*/ */
package sun.reflect; package jdk.internal.reflect;
import java.security.AccessController; import java.security.AccessController;
import java.security.PrivilegedAction; import java.security.PrivilegedAction;

View file

@ -23,7 +23,7 @@
* questions. * questions.
*/ */
package sun.reflect; package jdk.internal.reflect;
class ClassFileAssembler implements ClassFileConstants { class ClassFileAssembler implements ClassFileConstants {
private ByteVector vec; private ByteVector vec;

View file

@ -23,7 +23,7 @@
* questions. * questions.
*/ */
package sun.reflect; package jdk.internal.reflect;
/** Minimal set of class file constants for assembly of field and /** Minimal set of class file constants for assembly of field and
method accessors. */ method accessors. */

View file

@ -23,7 +23,7 @@
* questions. * questions.
*/ */
package sun.reflect; package jdk.internal.reflect;
import java.lang.reflect.*; import java.lang.reflect.*;

View file

@ -23,7 +23,7 @@
* questions. * questions.
*/ */
package sun.reflect; package jdk.internal.reflect;
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;

View file

@ -23,7 +23,7 @@
* questions. * questions.
*/ */
package sun.reflect; package jdk.internal.reflect;
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;

View file

@ -23,7 +23,7 @@
* questions. * questions.
*/ */
package sun.reflect; package jdk.internal.reflect;
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;

View file

@ -23,7 +23,7 @@
* questions. * questions.
*/ */
package sun.reflect; package jdk.internal.reflect;
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;

View file

@ -23,7 +23,7 @@
* questions. * questions.
*/ */
package sun.reflect; package jdk.internal.reflect;
/** This interface provides the declarations for the accessor methods /** This interface provides the declarations for the accessor methods
of java.lang.reflect.Field. Each Field object is configured with a of java.lang.reflect.Field. Each Field object is configured with a

View file

@ -23,7 +23,7 @@
* questions. * questions.
*/ */
package sun.reflect; package jdk.internal.reflect;
/** Package-private implementation of the FieldAccessor interface /** Package-private implementation of the FieldAccessor interface
which has access to all classes and all fields, regardless of which has access to all classes and all fields, regardless of

View file

@ -23,7 +23,7 @@
* questions. * questions.
*/ */
package sun.reflect; package jdk.internal.reflect;
import java.lang.reflect.Constructor; import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;

View file

@ -23,7 +23,7 @@
* questions. * questions.
*/ */
package sun.reflect; package jdk.internal.reflect;
import java.util.List; import java.util.List;
import java.util.ArrayList; import java.util.ArrayList;

View file

@ -23,7 +23,7 @@
* questions. * questions.
*/ */
package sun.reflect; package jdk.internal.reflect;
import java.lang.reflect.*; import java.lang.reflect.*;

View file

@ -23,7 +23,7 @@
* questions. * questions.
*/ */
package sun.reflect; package jdk.internal.reflect;
/** <P> MagicAccessorImpl (named for parity with FieldAccessorImpl and /** <P> MagicAccessorImpl (named for parity with FieldAccessorImpl and
others, not because it actually implements an interface) is a others, not because it actually implements an interface) is a

View file

@ -23,7 +23,7 @@
* questions. * questions.
*/ */
package sun.reflect; package jdk.internal.reflect;
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;

View file

@ -23,7 +23,7 @@
* questions. * questions.
*/ */
package sun.reflect; package jdk.internal.reflect;
import java.security.AccessController; import java.security.AccessController;
import java.security.PrivilegedAction; import java.security.PrivilegedAction;
@ -148,7 +148,7 @@ class MethodAccessorGenerator extends AccessorGenerator {
// (^ = Only present if generating SerializationConstructorAccessor) // (^ = Only present if generating SerializationConstructorAccessor)
// [UTF-8] [This class's name] // [UTF-8] [This class's name]
// [CONSTANT_Class_info] for above // [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 // [CONSTANT_Class_info] for above
// [UTF-8] [Target class's name] // [UTF-8] [Target class's name]
// [CONSTANT_Class_info] for above // [CONSTANT_Class_info] for above
@ -290,12 +290,12 @@ class MethodAccessorGenerator extends AccessorGenerator {
if (isConstructor) { if (isConstructor) {
if (forSerialization) { if (forSerialization) {
asm.emitConstantPoolUTF8 asm.emitConstantPoolUTF8
("sun/reflect/SerializationConstructorAccessorImpl"); ("jdk/internal/reflect/SerializationConstructorAccessorImpl");
} else { } else {
asm.emitConstantPoolUTF8("sun/reflect/ConstructorAccessorImpl"); asm.emitConstantPoolUTF8("jdk/internal/reflect/ConstructorAccessorImpl");
} }
} else { } else {
asm.emitConstantPoolUTF8("sun/reflect/MethodAccessorImpl"); asm.emitConstantPoolUTF8("jdk/internal/reflect/MethodAccessorImpl");
} }
asm.emitConstantPoolClass(asm.cpi()); asm.emitConstantPoolClass(asm.cpi());
superClass = asm.cpi(); superClass = asm.cpi();
@ -767,14 +767,14 @@ class MethodAccessorGenerator extends AccessorGenerator {
if (isConstructor) { if (isConstructor) {
if (forSerialization) { if (forSerialization) {
int num = ++serializationConstructorSymnum; int num = ++serializationConstructorSymnum;
return "sun/reflect/GeneratedSerializationConstructorAccessor" + num; return "jdk/internal/reflect/GeneratedSerializationConstructorAccessor" + num;
} else { } else {
int num = ++constructorSymnum; int num = ++constructorSymnum;
return "sun/reflect/GeneratedConstructorAccessor" + num; return "jdk/internal/reflect/GeneratedConstructorAccessor" + num;
} }
} else { } else {
int num = ++methodSymnum; int num = ++methodSymnum;
return "sun/reflect/GeneratedMethodAccessor" + num; return "jdk/internal/reflect/GeneratedMethodAccessor" + num;
} }
} }
} }

View file

@ -23,7 +23,7 @@
* questions. * questions.
*/ */
package sun.reflect; package jdk.internal.reflect;
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;

View file

@ -23,7 +23,7 @@
* questions. * questions.
*/ */
package sun.reflect; package jdk.internal.reflect;
import java.lang.reflect.*; import java.lang.reflect.*;
import sun.reflect.misc.ReflectUtil; import sun.reflect.misc.ReflectUtil;

View file

@ -23,7 +23,7 @@
* questions. * questions.
*/ */
package sun.reflect; package jdk.internal.reflect;
import java.lang.reflect.*; import java.lang.reflect.*;
import sun.reflect.misc.ReflectUtil; import sun.reflect.misc.ReflectUtil;

View file

@ -23,7 +23,7 @@
* questions. * questions.
*/ */
package sun.reflect; package jdk.internal.reflect;
import java.lang.reflect.*; import java.lang.reflect.*;
@ -66,11 +66,11 @@ public class Reflection {
public static native Class<?> getCallerClass(); public static native Class<?> getCallerClass();
/** /**
* @deprecated This method will be removed in JDK 9. * @deprecated This method will be removed.
* This method is a private JDK API and retained temporarily for * This method is a private JDK API and retained temporarily to
* existing code to run until a replacement API is defined. * simplify the implementation of sun.misc.Reflection.getCallerClass.
*/ */
@Deprecated @Deprecated(forRemoval=true)
public static native Class<?> getCallerClass(int depth); public static native Class<?> getCallerClass(int depth);
/** Retrieves the access flags written to the class file. For /** Retrieves the access flags written to the class file. For

View file

@ -23,7 +23,7 @@
* questions. * questions.
*/ */
package sun.reflect; package jdk.internal.reflect;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import java.lang.reflect.Executable; import java.lang.reflect.Executable;

View file

@ -23,7 +23,7 @@
* questions. * questions.
*/ */
package sun.reflect; package jdk.internal.reflect;
/** <P> Java serialization (in java.io) expects to be able to /** <P> Java serialization (in java.io) expects to be able to
instantiate a class and invoke a no-arg constructor of that instantiate a class and invoke a no-arg constructor of that

View file

@ -23,11 +23,11 @@
* questions. * questions.
*/ */
package sun.reflect; package jdk.internal.reflect;
/** Assists in iterating down a method's signature */ /** Assists in iterating down a method's signature */
public class SignatureIterator { class SignatureIterator {
private final String sig; private final String sig;
private int idx; private int idx;

View file

@ -23,7 +23,7 @@
* questions. * questions.
*/ */
package sun.reflect; package jdk.internal.reflect;
/** It is necessary to use a "bootstrap" UTF-8 encoder for encoding /** It is necessary to use a "bootstrap" UTF-8 encoder for encoding
constant pool entries because the character set converters rely on constant pool entries because the character set converters rely on

View file

@ -23,7 +23,7 @@
* questions. * questions.
*/ */
package sun.reflect; package jdk.internal.reflect;
import java.lang.reflect.Field; import java.lang.reflect.Field;

View file

@ -23,7 +23,7 @@
* questions. * questions.
*/ */
package sun.reflect; package jdk.internal.reflect;
import java.lang.reflect.Field; import java.lang.reflect.Field;

View file

@ -23,7 +23,7 @@
* questions. * questions.
*/ */
package sun.reflect; package jdk.internal.reflect;
import java.lang.reflect.Field; import java.lang.reflect.Field;

View file

@ -23,7 +23,7 @@
* questions. * questions.
*/ */
package sun.reflect; package jdk.internal.reflect;
import java.lang.reflect.Field; import java.lang.reflect.Field;

View file

@ -23,7 +23,7 @@
* questions. * questions.
*/ */
package sun.reflect; package jdk.internal.reflect;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import java.lang.reflect.Modifier; import java.lang.reflect.Modifier;

View file

@ -23,7 +23,7 @@
* questions. * questions.
*/ */
package sun.reflect; package jdk.internal.reflect;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import java.lang.reflect.Modifier; import java.lang.reflect.Modifier;

View file

@ -23,7 +23,7 @@
* questions. * questions.
*/ */
package sun.reflect; package jdk.internal.reflect;
import java.lang.reflect.Field; import java.lang.reflect.Field;

View file

@ -23,7 +23,7 @@
* questions. * questions.
*/ */
package sun.reflect; package jdk.internal.reflect;
import java.lang.reflect.Field; import java.lang.reflect.Field;

View file

@ -23,7 +23,7 @@
* questions. * questions.
*/ */
package sun.reflect; package jdk.internal.reflect;
import java.lang.reflect.Field; import java.lang.reflect.Field;

View file

@ -23,7 +23,7 @@
* questions. * questions.
*/ */
package sun.reflect; package jdk.internal.reflect;
import java.lang.reflect.Field; import java.lang.reflect.Field;

View file

@ -23,7 +23,7 @@
* questions. * questions.
*/ */
package sun.reflect; package jdk.internal.reflect;
import java.lang.reflect.Field; import java.lang.reflect.Field;

View file

@ -23,7 +23,7 @@
* questions. * questions.
*/ */
package sun.reflect; package jdk.internal.reflect;
import java.lang.reflect.Field; import java.lang.reflect.Field;

View file

@ -23,7 +23,7 @@
* questions. * questions.
*/ */
package sun.reflect; package jdk.internal.reflect;
import java.lang.reflect.Field; import java.lang.reflect.Field;

View file

@ -23,7 +23,7 @@
* questions. * questions.
*/ */
package sun.reflect; package jdk.internal.reflect;
import java.lang.reflect.Field; import java.lang.reflect.Field;

View file

@ -23,7 +23,7 @@
* questions. * questions.
*/ */
package sun.reflect; package jdk.internal.reflect;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import java.lang.reflect.Modifier; import java.lang.reflect.Modifier;

View file

@ -23,7 +23,7 @@
* questions. * questions.
*/ */
package sun.reflect; package jdk.internal.reflect;
import java.lang.reflect.Field; import java.lang.reflect.Field;

View file

@ -23,7 +23,7 @@
* questions. * questions.
*/ */
package sun.reflect; package jdk.internal.reflect;
import java.lang.reflect.Field; import java.lang.reflect.Field;

View file

@ -23,7 +23,7 @@
* questions. * questions.
*/ */
package sun.reflect; package jdk.internal.reflect;
import java.lang.reflect.Field; import java.lang.reflect.Field;

View file

@ -23,7 +23,7 @@
* questions. * questions.
*/ */
package sun.reflect; package jdk.internal.reflect;
import java.lang.reflect.Field; import java.lang.reflect.Field;

View file

@ -23,7 +23,7 @@
* questions. * questions.
*/ */
package sun.reflect; package jdk.internal.reflect;
import java.lang.reflect.Field; import java.lang.reflect.Field;

View file

@ -23,7 +23,7 @@
* questions. * questions.
*/ */
package sun.reflect; package jdk.internal.reflect;
import java.lang.reflect.Field; import java.lang.reflect.Field;

View file

@ -23,7 +23,7 @@
* questions. * questions.
*/ */
package sun.reflect; package jdk.internal.reflect;
import java.lang.reflect.Field; import java.lang.reflect.Field;

View file

@ -23,7 +23,7 @@
* questions. * questions.
*/ */
package sun.reflect; package jdk.internal.reflect;
import java.lang.reflect.Field; import java.lang.reflect.Field;

View file

@ -23,7 +23,7 @@
* questions. * questions.
*/ */
package sun.reflect; package jdk.internal.reflect;
import java.lang.reflect.Field; import java.lang.reflect.Field;

View file

@ -23,7 +23,7 @@
* questions. * questions.
*/ */
package sun.reflect; package jdk.internal.reflect;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import java.lang.reflect.Modifier; import java.lang.reflect.Modifier;

View file

@ -23,7 +23,7 @@
* questions. * questions.
*/ */
package sun.reflect; package jdk.internal.reflect;
import java.lang.reflect.Field; import java.lang.reflect.Field;

View file

@ -23,7 +23,7 @@
* questions. * questions.
*/ */
package sun.reflect; package jdk.internal.reflect;
import java.lang.reflect.Field; import java.lang.reflect.Field;

View file

@ -23,7 +23,7 @@
* questions. * questions.
*/ */
package sun.reflect; package jdk.internal.reflect;
import java.lang.reflect.Field; import java.lang.reflect.Field;

View file

@ -23,7 +23,7 @@
* questions. * questions.
*/ */
package sun.reflect; package jdk.internal.reflect;
import java.lang.reflect.Field; import java.lang.reflect.Field;

View file

@ -23,7 +23,7 @@
* questions. * questions.
*/ */
package sun.reflect; package jdk.internal.reflect;
import java.lang.reflect.Field; import java.lang.reflect.Field;

View file

@ -23,7 +23,7 @@
* questions. * questions.
*/ */
package sun.reflect; package jdk.internal.reflect;
import java.lang.reflect.Field; import java.lang.reflect.Field;

View file

@ -23,7 +23,7 @@
* questions. * questions.
*/ */
package sun.reflect; package jdk.internal.reflect;
import java.lang.reflect.Field; import java.lang.reflect.Field;

View file

@ -23,7 +23,7 @@
* questions. * questions.
*/ */
package sun.reflect; package jdk.internal.reflect;
import java.lang.reflect.Field; import java.lang.reflect.Field;

View file

@ -23,7 +23,7 @@
* questions. * questions.
*/ */
package sun.reflect; package jdk.internal.reflect;
import java.lang.reflect.Field; import java.lang.reflect.Field;

View file

@ -23,7 +23,7 @@
* questions. * questions.
*/ */
package sun.reflect; package jdk.internal.reflect;
import java.lang.reflect.Field; import java.lang.reflect.Field;

View file

@ -23,7 +23,7 @@
* questions. * questions.
*/ */
package sun.reflect; package jdk.internal.reflect;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import java.lang.reflect.Modifier; import java.lang.reflect.Modifier;

View file

@ -23,7 +23,7 @@
* questions. * questions.
*/ */
package sun.reflect; package jdk.internal.reflect;
import java.lang.reflect.Field; import java.lang.reflect.Field;

View file

@ -23,7 +23,7 @@
* questions. * questions.
*/ */
package sun.reflect; package jdk.internal.reflect;
import java.lang.reflect.Field; import java.lang.reflect.Field;

Some files were not shown because too many files have changed in this diff Show more