< prev index next >

src/java.base/share/classes/java/lang/invoke/MemberName.java

Print this page

        

*** 189,202 **** * 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(); if (isConstructor() && getReferenceKind() == REF_newInvokeSpecial) ! return itype.changeReturnType(clazz); if (!isStatic()) ! return itype.insertParameterTypes(0, clazz); return itype; } /** Utility method producing the parameter types of the method type. */ public Class<?>[] getParameterTypes() { --- 189,203 ---- * 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(c); if (!isStatic()) ! return itype.insertParameterTypes(0, c); return itype; } /** Utility method producing the parameter types of the method type. */ public Class<?>[] getParameterTypes() {
< prev index next >