APIdia Launch Partner
Top Description Fields Constructors
java.lang.invoke

public Class WrongMethodTypeException

extends RuntimeException
Class Inheritance

Thrown to indicate that code has attempted to call a method handle via the wrong method type. As with the bytecode representation of normal Java method calls, method handle calls are strongly typed to a specific type descriptor associated with a call site.

This exception may also be thrown when two method handles are composed, and the system detects that their types cannot be matched up correctly. This amounts to an early evaluation of the type mismatch, at method handle construction time, instead of when the mismatched method handle is called.

Author
John Rose, JSR 292 EG
Since
1.7

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
public
WrongMethodTypeException()

Constructs a WrongMethodTypeException with no detail message.

public
WrongMethodTypeException(String
the detail message.
s
)

Constructs a WrongMethodTypeException with the specified detail message.

pack-priv
WrongMethodTypeException(String
the detail message.
s
,
Throwable
the cause of the exception, or null.
cause
)

Constructs a WrongMethodTypeException with the specified detail message and cause.

pack-priv
WrongMethodTypeException(Throwable
the cause of the exception, or null.
cause
)

Constructs a WrongMethodTypeException with the specified cause.

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.lang.RuntimeException.serialVersionUID.

Annotations
@Serial

Constructor Detail

WrongMethodTypeExceptionback to summary
public WrongMethodTypeException()

Constructs a WrongMethodTypeException with no detail message.

WrongMethodTypeExceptionback to summary
public WrongMethodTypeException(String s)

Constructs a WrongMethodTypeException with the specified detail message.

Parameters
s:String

the detail message.

WrongMethodTypeExceptionback to summary
pack-priv WrongMethodTypeException(String s, Throwable cause)

Constructs a WrongMethodTypeException with the specified detail message and cause.

Parameters
s:String

the detail message.

cause:Throwable

the cause of the exception, or null.

WrongMethodTypeExceptionback to summary
pack-priv WrongMethodTypeException(Throwable cause)

Constructs a WrongMethodTypeException with the specified cause.

Parameters
cause:Throwable

the cause of the exception, or null.