Class Breakpoint.Builder
java.lang.Object
com.oracle.truffle.api.debug.Breakpoint.Builder
- Enclosing class:
Breakpoint
Builder implementation for a new
breakpoint.- Since:
- 0.17
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbuild()columnIs(int column) Specifies the breakpoint's column number.ignoreCount(int ignoreCount) Specifies the number of times a breakpoint is ignored until it hits (i.e.lineIs(int line) Specifies the breakpoint's line number.oneShot()Specifies that the breakpoint will disable itself after suspending execution, i.e.resolveListener(Breakpoint.ResolveListener resolveListener) Set a resolve listener.rootInstance(DebugValue rootInstance) Specifies the breakpoint's root instance.sourceElements(SourceElement... sourceElements) Specifies which source elements will this breakpoint adhere to.suspendAnchor(SuspendAnchor anchor) Specify the breakpoint suspension anchor within the guest language source location.
-
Method Details
-
lineIs
Specifies the breakpoint's line number. Can only be invoked once per builder. Cannot be used together withBreakpoint.newBuilder(SourceSection).- Parameters:
line- 1-based line number- Throws:
IllegalStateException- ifline < 1- Since:
- 0.17
-
suspendAnchor
Specify the breakpoint suspension anchor within the guest language source location. By default, the breakpoint suspendsbeforethe source location.- Parameters:
anchor- the breakpoint suspension anchor- Since:
- 0.32
-
columnIs
Specifies the breakpoint's column number. Can only be invoked once per builder. Cannot be used together withBreakpoint.newBuilder(SourceSection). A line needs to be specified before a column can be set.- Parameters:
column- 1-based column number- Throws:
IllegalStateException- ifcolumn < 1- Since:
- 0.33
-
resolveListener
-
ignoreCount
Specifies the number of times a breakpoint is ignored until it hits (i.e. suspends execution}.- Since:
- 0.17
- See Also:
-
oneShot
Specifies that the breakpoint will disable itself after suspending execution, i.e. on first hit.Disabled one-shot breakpoints can be re-enabled.
- Since:
- 0.17
-
sourceElements
Specifies which source elements will this breakpoint adhere to. When not specified, breakpoint adhere toSourceElement.STATEMENTelements. Can only be invoked once per builder.- Parameters:
sourceElements- a non-empty list of source elements- Since:
- 0.33
-
rootInstance
Specifies the breakpoint's root instance. The breakpoint will be hit only when theDebugScope.getRootInstance()matches to the provided one.- Parameters:
rootInstance- value of the root instance in which the breakpoint is to be hit.- Since:
- 19.3.0
-
build
- Returns:
- a new breakpoint instance of
SOURCE_LOCATIONkind. - Since:
- 0.17
-