< prev index next >

src/java.base/share/classes/java/lang/reflect/ReflectAccess.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 2001, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 27,82 **** 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 jdk.internal.reflect.LangReflectAccess { ! public Field newField(Class<?> declaringClass, ! String name, ! Class<?> type, ! int modifiers, ! int slot, ! String signature, ! byte[] annotations) ! { ! return new Field(declaringClass, ! name, ! type, ! modifiers, ! slot, ! signature, ! annotations); ! } ! ! public Method newMethod(Class<?> declaringClass, ! String name, ! Class<?>[] parameterTypes, ! Class<?> returnType, ! Class<?>[] checkedExceptions, ! int modifiers, ! int slot, ! String signature, ! byte[] annotations, ! byte[] parameterAnnotations, ! byte[] annotationDefault) ! { ! return new Method(declaringClass, ! name, ! parameterTypes, ! returnType, ! checkedExceptions, ! modifiers, ! slot, ! signature, ! annotations, ! parameterAnnotations, ! annotationDefault); ! } ! public <T> Constructor<T> newConstructor(Class<T> declaringClass, Class<?>[] parameterTypes, Class<?>[] checkedExceptions, int modifiers, int slot, --- 27,40 ---- import jdk.internal.reflect.MethodAccessor; import jdk.internal.reflect.ConstructorAccessor; /** Package-private class implementing the ! jdk.internal.access.JavaLangReflectAccess interface, allowing the java.lang package to instantiate objects in this package. */ ! class ReflectAccess implements jdk.internal.access.JavaLangReflectAccess { public <T> Constructor<T> newConstructor(Class<T> declaringClass, Class<?>[] parameterTypes, Class<?>[] checkedExceptions, int modifiers, int slot,
< prev index next >