Uses of Class
jdk.jshell.Snippet
Packages that use Snippet
Package
Description
Provides interfaces for creating tools, such as a Read-Eval-Print Loop (REPL),
which interactively evaluate "snippets" of Java programming language code.
-
Uses of Snippet in jdk.jshell
Subclasses of Snippet in jdk.jshellModifier and TypeClassDescriptionclassGrouping for all declaration Snippets: variable declarations (VarSnippet), method declarations (MethodSnippet), and type declarations (TypeDeclSnippet).classA snippet of code that is not valid Java programming language code.classSnippet for an assignment or variable-value expression.classSnippet for an import declaration.classSnippet for a method definition.classGrouping for Snippets which persist and influence future code.classSnippet for a statement.classSnippet for a type definition (a class, interface, enum, or annotation interface definition).classSnippet for a variable definition.Methods in jdk.jshell that return SnippetModifier and TypeMethodDescriptionSnippetEvent.causeSnippet()Either the snippet whose change caused this update ornull.SnippetEvent.snippet()The Snippet which has changedMethods in jdk.jshell that return types with arguments of type SnippetModifier and TypeMethodDescriptionabstract Collection<Snippet>SourceCodeAnalysis.dependents(Snippet snippet) Returns a collection ofSnippets which might need updating if the givenSnippetis updated.JShell.snippets()Return all snippets.SourceCodeAnalysis.sourceToSnippets(String input) Converts the source code of a snippet into aSnippetobject (or list ofSnippetobjects in the case of some var declarations, e.g.: int x, y, z;).Methods in jdk.jshell with parameters of type SnippetModifier and TypeMethodDescriptionabstract Collection<Snippet>SourceCodeAnalysis.dependents(Snippet snippet) Returns a collection ofSnippets which might need updating if the givenSnippetis updated.JShell.diagnostics(Snippet snippet) Return the diagnostics of the most recent evaluation of the snippet.Remove a declaration from the state.Return the status of the snippet.abstract SourceCodeAnalysis.SnippetWrapperReturns the wrapper information for theSnippet.Method parameters in jdk.jshell with type arguments of type SnippetModifier and TypeMethodDescriptionJShell.Builder.idGenerator(BiFunction<Snippet, Integer, String> generator) Sets the generator of identifying names for Snippets.