|
1 | 1 | /* |
2 | | - * Copyright (c) 1999, 2024, Oracle and/or its affiliates. All rights reserved. |
| 2 | + * Copyright (c) 1999, 2025, Oracle and/or its affiliates. All rights reserved. |
3 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 | 4 | * |
5 | 5 | * This code is free software; you can redistribute it and/or modify it |
@@ -54,41 +54,40 @@ public interface InvocationHandler { |
54 | 54 | * @param proxy the proxy instance that the method was invoked on |
55 | 55 | * |
56 | 56 | * @param method the {@code Method} instance corresponding to |
57 | | - * the interface method invoked on the proxy instance. The declaring |
58 | | - * class of the {@code Method} object will be the interface that |
59 | | - * the method was declared in, which may be a superinterface of the |
60 | | - * proxy interface that the proxy class inherits the method through. |
| 57 | + * the method invoked on the proxy instance; the declaring |
| 58 | + * class of the {@code Method} object may be a proxy interface, |
| 59 | + * one of their superinterfaces, or the {@code Object} class |
61 | 60 | * |
62 | 61 | * @param args an array of objects containing the values of the |
63 | 62 | * arguments passed in the method invocation on the proxy instance, |
64 | | - * or {@code null} if interface method takes no arguments. |
| 63 | + * or {@code null} if the invoked method takes no arguments. |
65 | 64 | * Arguments of primitive types are wrapped in instances of the |
66 | 65 | * appropriate primitive wrapper class, such as |
67 | 66 | * {@code java.lang.Integer} or {@code java.lang.Boolean}. |
68 | 67 | * |
69 | 68 | * @return the value to return from the method invocation on the |
70 | | - * proxy instance. If the declared return type of the interface |
| 69 | + * proxy instance. If the declared return type of the invoked |
71 | 70 | * method is a primitive type, then the value returned by |
72 | 71 | * this method must be an instance of the corresponding primitive |
73 | 72 | * wrapper class; otherwise, it must be a type assignable to the |
74 | 73 | * declared return type. If the value returned by this method is |
75 | | - * {@code null} and the interface method's return type is |
| 74 | + * {@code null} and the invoked method's return type is |
76 | 75 | * primitive, then a {@code NullPointerException} will be |
77 | 76 | * thrown by the method invocation on the proxy instance. If the |
78 | 77 | * value returned by this method is otherwise not compatible with |
79 | | - * the interface method's declared return type as described above, |
| 78 | + * the invoked method's declared return type as described above, |
80 | 79 | * a {@code ClassCastException} will be thrown by the method |
81 | 80 | * invocation on the proxy instance. |
82 | 81 | * |
83 | 82 | * @throws Throwable the exception to throw from the method |
84 | 83 | * invocation on the proxy instance. The exception's type must be |
85 | 84 | * assignable either to any of the exception types declared in the |
86 | | - * {@code throws} clause of the interface method or to the |
| 85 | + * {@code throws} clause of the invoked method or to the |
87 | 86 | * unchecked exception types {@code java.lang.RuntimeException} |
88 | 87 | * or {@code java.lang.Error}. If a checked exception is |
89 | 88 | * thrown by this method that is not assignable to any of the |
90 | 89 | * exception types declared in the {@code throws} clause of |
91 | | - * the interface method, then an |
| 90 | + * the invoked method, then an |
92 | 91 | * {@link UndeclaredThrowableException} containing the |
93 | 92 | * exception that was thrown by this method will be thrown by the |
94 | 93 | * method invocation on the proxy instance. |
|
0 commit comments