public void visitAnyMethodrefConstant(Clazz clazz, RefConstant methodrefConstant) { String type = methodrefConstant.getType(clazz); // Count the number of parameters. int parameterCount = ClassUtil.internalMethodParameterCount(type); if (!isStatic) { parameterCount++; } // Pop the parameters and the class reference, in reverse order. for (int parameterIndex = parameterCount-1; parameterIndex >= 0; parameterIndex--) { setMethodParameterValue(clazz, methodrefConstant, parameterIndex, stack.pop()); } // Push the return value, if applicable. String returnType = ClassUtil.internalMethodReturnType(type); if (returnType.charAt(0) != ClassConstants.INTERNAL_TYPE_VOID) { stack.push(getMethodReturnValue(clazz, methodrefConstant, returnType)); } }