`j.l.StringBuilder`'s documentation mentions the public method `setLength()`. This method is declared in superclass `AbstractStringBuilder`, a package-protected abstract class, and does not appear in `StringBuilder` source code.
The javac compiler generates a public synthetic bridge method for `setLength()` in `StringBuilder`.
However, jshell fails to show it on <TAB>-completion. For a reader of the javadoc of the class, this is quite surprising.
| Welcome to JShell -- Version 19.0.1
| For an introduction type: /help intro
jshell> var sb = new StringBuilder()
sb ==>
jshell> sb.<TAB>
append( appendCodePoint( compareTo( delete(
deleteCharAt( equals( getClass() hashCode()
indexOf( insert( isEmpty() lastIndexOf(
notify() notifyAll() replace( reverse()
toString() wait(
jshell> sb.
The javac compiler generates a public synthetic bridge method for `setLength()` in `StringBuilder`.
However, jshell fails to show it on <TAB>-completion. For a reader of the javadoc of the class, this is quite surprising.
| Welcome to JShell -- Version 19.0.1
| For an introduction type: /help intro
jshell> var sb = new StringBuilder()
sb ==>
jshell> sb.<TAB>
append( appendCodePoint( compareTo( delete(
deleteCharAt( equals( getClass() hashCode()
indexOf( insert( isEmpty() lastIndexOf(
notify() notifyAll() replace( reverse()
toString() wait(
jshell> sb.