src/share/classes/java/lang/System.java

Print this page

        

*** 1169,1185 **** } private static void setJavaLangAccess() { // Allow privileged classes outside of java.lang sun.misc.SharedSecrets.setJavaLangAccess(new sun.misc.JavaLangAccess(){ ! public sun.reflect.ConstantPool getConstantPool(Class klass) { return klass.getConstantPool(); } ! public void setAnnotationType(Class klass, AnnotationType type) { klass.setAnnotationType(type); } ! public AnnotationType getAnnotationType(Class klass) { return klass.getAnnotationType(); } public <E extends Enum<E>> E[] getEnumConstantsShared(Class<E> klass) { return klass.getEnumConstantsShared(); --- 1169,1185 ---- } private static void setJavaLangAccess() { // Allow privileged classes outside of java.lang sun.misc.SharedSecrets.setJavaLangAccess(new sun.misc.JavaLangAccess(){ ! public sun.reflect.ConstantPool getConstantPool(Class<?> klass) { return klass.getConstantPool(); } ! public void setAnnotationType(Class<?> klass, AnnotationType type) { klass.setAnnotationType(type); } ! public AnnotationType getAnnotationType(Class<?> klass) { return klass.getAnnotationType(); } public <E extends Enum<E>> E[] getEnumConstantsShared(Class<E> klass) { return klass.getEnumConstantsShared();