Package org.graalvm.polyglot.tck
Class InlineSnippet.Builder
java.lang.Object
org.graalvm.polyglot.tck.InlineSnippet.Builder
- Enclosing class:
InlineSnippet
The builder of an
InlineSnippet.- Since:
- 0.32
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Creates a newInlineSnippetconfigured by thisInlineSnippet.Builder.locationPredicate(Predicate<org.graalvm.polyglot.SourceSection> locationPredicate) Sets a testing predicate for locations at which the source is executed.resultVerifier(ResultVerifier resultVerifier) Sets a custom verifier of a result of theinline sourceexecution.
-
Method Details
-
locationPredicate
public InlineSnippet.Builder locationPredicate(Predicate<org.graalvm.polyglot.SourceSection> locationPredicate) Sets a testing predicate for locations at which the source is executed. By default, the source is executed at all instrumentable statement and call locations in the script.- Returns:
- the predicate that returns
trueforSourceSections where source is to be executed - Since:
- 0.32
-
resultVerifier
Sets a custom verifier of a result of theinline sourceexecution.- Parameters:
resultVerifier- the customResultVerifier- Returns:
- this
InlineSnippet.Builder - Since:
- 0.32
-
build
Creates a newInlineSnippetconfigured by thisInlineSnippet.Builder.- Returns:
- the
InlineSnippet - Since:
- 0.32
-