问题
is there any command available that can print all newly created methods in current jshell session?
Something similar to /list
but only for methods
回答1:
You are looking for the command
/methods -all
which prints all the methods including those added when JShell was started, and methods that failed, were overwritten, or were dropped.
For active methods declared by you, use it simply without any argument as :
/methods
来源:https://stackoverflow.com/questions/47543272/list-all-active-methods-in-jshell