Module jdk.jshell
Package jdk.jshell

Class MethodSnippet

java.lang.Object

public class MethodSnippet extends DeclarationSnippet
Snippet for a method definition. The Kind is Snippet.Kind.METHOD.

MethodSnippet is immutable: an access to any of its methods will always return the same result. and thus is thread-safe.

See Java Language Specification:
8.4 Method Declarations
Since:
9