< prev index next >
src/java.base/share/classes/java/lang/invoke/MemberName.java
Print this page
@@ -189,14 +189,15 @@
* For non-static methods or constructors, this is the type with a leading parameter,
* a reference to declaring class. For static methods, it is the same as the declared type.
*/
public MethodType getInvocationType() {
MethodType itype = getMethodOrFieldType();
+ Class<?> c = clazz.isValue() ? clazz.asValueType() : clazz;
if (isConstructor() && getReferenceKind() == REF_newInvokeSpecial)
- return itype.changeReturnType(clazz);
+ return itype.changeReturnType(c);
if (!isStatic())
- return itype.insertParameterTypes(0, clazz);
+ return itype.insertParameterTypes(0, c);
return itype;
}
/** Utility method producing the parameter types of the method type. */
public Class<?>[] getParameterTypes() {
< prev index next >