Class NearestSectionFilter.Builder
java.lang.Object
com.oracle.truffle.api.instrumentation.NearestSectionFilter.Builder
- Enclosing class:
NearestSectionFilter
Builder to configure
NearestSectionFilter
before creating its instance. Specify
various parameters by calling individual NearestSectionFilter.Builder
methods. When done, call
build()
.- Since:
- 23.0
-
Method Summary
Modifier and TypeMethodDescriptionanchorStart
(boolean start) Specify the nearest anchor.build()
Finalizes and constructs theNearestSectionFilter
instance.Specify tags of the nearest source section.
-
Method Details
-
anchorStart
Specify the nearest anchor. By default, the start of source section is used.- Parameters:
start
- specify if we search for the nearest start or nearest end of the filtered source sections to the given location.true
for the start andfalse
for the end.- Returns:
- the builder to chain calls
- Since:
- 23.0
-
tagIs
Specify tags of the nearest source section. More accurate result might be provided when tags are not specified in the base source section filter bySourceSectionFilter.Builder.tagIs(Class...)
, but here instead.- Parameters:
tags
- a set of tags, the nearest node needs to be tagged with at least one tag from this set- Returns:
- the builder to chain calls
- Since:
- 23.0
-
build
Finalizes and constructs theNearestSectionFilter
instance.- Returns:
- the built filter
- Since:
- 23.0
-