src/java.base/share/classes/java/lang/invoke/LambdaForm.java
Print this page
rev 10552 : 8055723[core]: Replace concat String to append in StringBuilder parameters
Contributed-by: Otavio Santana <otaviojava@java.net>
*** 832,861 ****
else
return false;
}
public String toString() {
! StringBuilder buf = new StringBuilder(debugName+"=Lambda(");
for (int i = 0; i < names.length; i++) {
! if (i == arity) buf.append(")=>{");
Name n = names[i];
! if (i >= arity) buf.append("\n ");
! buf.append(n);
if (i < arity) {
! if (i+1 < arity) buf.append(",");
continue;
}
! buf.append("=").append(n.exprString());
! buf.append(";");
}
! buf.append(result < 0 ? "void" : names[result]).append("}");
if (TRACE_INTERPRETER) {
// Extra verbosity:
! buf.append(":").append(basicTypeSignature());
! buf.append("/").append(vmentry);
}
! return buf.toString();
}
/**
* Apply immediate binding for a Name in this form indicated by its position relative to the form.
* The first parameter to a LambdaForm, a0:L, always represents the form's method handle, so 0 is not
--- 832,862 ----
else
return false;
}
public String toString() {
! StringBuilder sb = new StringBuilder();
! sb.append(debugName).append("=Lambda(");
for (int i = 0; i < names.length; i++) {
! if (i == arity) sb.append(")=>{");
Name n = names[i];
! if (i >= arity) sb.append("\n ");
! sb.append(n);
if (i < arity) {
! if (i+1 < arity) sb.append(",");
continue;
}
! sb.append("=").append(n.exprString());
! sb.append(";");
}
! sb.append(result < 0 ? "void" : names[result]).append("}");
if (TRACE_INTERPRETER) {
// Extra verbosity:
! sb.append(":").append(basicTypeSignature());
! sb.append("/").append(vmentry);
}
! return sb.toString();
}
/**
* Apply immediate binding for a Name in this form indicated by its position relative to the form.
* The first parameter to a LambdaForm, a0:L, always represents the form's method handle, so 0 is not