Class NearestSectionFilter.Builder

java.lang.Object
com.oracle.truffle.api.instrumentation.NearestSectionFilter.Builder
Enclosing class:
NearestSectionFilter

public static final class NearestSectionFilter.Builder extends Object
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 Details

    • anchorStart

      public NearestSectionFilter.Builder anchorStart(boolean start)
      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 and false for the end.
      Returns:
      the builder to chain calls
      Since:
      23.0
    • tagIs

      public NearestSectionFilter.Builder tagIs(Class<?>... tags)
      Specify tags of the nearest source section. More accurate result might be provided when tags are not specified in the base source section filter by SourceSectionFilter.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

      public NearestSectionFilter build()
      Finalizes and constructs the NearestSectionFilter instance.
      Returns:
      the built filter
      Since:
      23.0