< prev index next >

src/java.base/share/classes/jdk/internal/reflect/MethodAccessorImpl.java

Print this page

28 import java.lang.reflect.InvocationTargetException;
29 
30 /** <P> Package-private implementation of the MethodAccessor interface
31     which has access to all classes and all fields, regardless of
32     language restrictions. See MagicAccessor. </P>
33 
34     <P> This class is known to the VM; do not change its name without
35     also changing the VM's code. </P>
36 
37     <P> NOTE: ALL methods of subclasses are skipped during security
38     walks up the stack. The assumption is that the only such methods
39     that will persistently show up on the stack are the implementing
40     methods for java.lang.reflect.Method.invoke(). </P>
41 */
42 
43 abstract class MethodAccessorImpl extends MagicAccessorImpl
44     implements MethodAccessor {
45     /** Matches specification in {@link java.lang.reflect.Method} */
46     public abstract Object invoke(Object obj, Object[] args)
47         throws IllegalArgumentException, InvocationTargetException;





48 }

28 import java.lang.reflect.InvocationTargetException;
29 
30 /** <P> Package-private implementation of the MethodAccessor interface
31     which has access to all classes and all fields, regardless of
32     language restrictions. See MagicAccessor. </P>
33 
34     <P> This class is known to the VM; do not change its name without
35     also changing the VM's code. </P>
36 
37     <P> NOTE: ALL methods of subclasses are skipped during security
38     walks up the stack. The assumption is that the only such methods
39     that will persistently show up on the stack are the implementing
40     methods for java.lang.reflect.Method.invoke(). </P>
41 */
42 
43 abstract class MethodAccessorImpl extends MagicAccessorImpl
44     implements MethodAccessor {
45     /** Matches specification in {@link java.lang.reflect.Method} */
46     public abstract Object invoke(Object obj, Object[] args)
47         throws IllegalArgumentException, InvocationTargetException;
48 
49     public Object invoke(Object obj, Object[] args, Class<?> caller)
50             throws IllegalArgumentException, InvocationTargetException {
51         return invoke(obj, args);
52     }
53 }
< prev index next >