24 */
25
26 package java.lang.invoke;
27
28 /**
29 * Thrown to indicate that code has attempted to call a method handle
30 * via the wrong method type. As with the bytecode representation of
31 * normal Java method calls, method handle calls are strongly typed
32 * to a specific type descriptor associated with a call site.
33 * <p>
34 * This exception may also be thrown when two method handles are
35 * composed, and the system detects that their types cannot be
36 * matched up correctly. This amounts to an early evaluation
37 * of the type mismatch, at method handle construction time,
38 * instead of when the mismatched method handle is called.
39 *
40 * @author John Rose, JSR 292 EG
41 * @since 1.7
42 */
43 public class WrongMethodTypeException extends RuntimeException {
44 private static final long serialVersionUID = 292L;
45
46 /**
47 * Constructs a {@code WrongMethodTypeException} with no detail message.
48 */
49 public WrongMethodTypeException() {
50 super();
51 }
52
53 /**
54 * Constructs a {@code WrongMethodTypeException} with the specified
55 * detail message.
56 *
57 * @param s the detail message.
58 */
59 public WrongMethodTypeException(String s) {
60 super(s);
61 }
62
63 /**
|
24 */
25
26 package java.lang.invoke;
27
28 /**
29 * Thrown to indicate that code has attempted to call a method handle
30 * via the wrong method type. As with the bytecode representation of
31 * normal Java method calls, method handle calls are strongly typed
32 * to a specific type descriptor associated with a call site.
33 * <p>
34 * This exception may also be thrown when two method handles are
35 * composed, and the system detects that their types cannot be
36 * matched up correctly. This amounts to an early evaluation
37 * of the type mismatch, at method handle construction time,
38 * instead of when the mismatched method handle is called.
39 *
40 * @author John Rose, JSR 292 EG
41 * @since 1.7
42 */
43 public class WrongMethodTypeException extends RuntimeException {
44 @java.io.Serial
45 private static final long serialVersionUID = 292L;
46
47 /**
48 * Constructs a {@code WrongMethodTypeException} with no detail message.
49 */
50 public WrongMethodTypeException() {
51 super();
52 }
53
54 /**
55 * Constructs a {@code WrongMethodTypeException} with the specified
56 * detail message.
57 *
58 * @param s the detail message.
59 */
60 public WrongMethodTypeException(String s) {
61 super(s);
62 }
63
64 /**
|