Package cs1302.tracer.api
Class TraceRequest.Builder
java.lang.Object
cs1302.tracer.api.TraceRequest.Builder
- Enclosing class:
TraceRequest
Mutable, reusable request construction; not thread-safe.
Breakpoint lists are detached when supplied. Required scalar values are checked by
build(). Building preserves requested settings without parsing source or breakpoint text.- Since:
- 4.1.0
-
Method Summary
Modifier and TypeMethodDescriptionaccumulate(boolean accumulate) Sets the accumulate setting.breakpoints(List<String> breakpoints) Sets and detaches the selected breakpoint specifications.build()Builds a request using the existing constructor's validation.chronological(boolean chronological) Sets the chronological setting.format(TraceFormat format) Sets the format setting.inlineStrings(boolean inlineStrings) Selects string inlining for Python Tutor output; modern output ignores this setting.inspection(InspectionPolicy inspection) Sets the inspection setting.limits(TraceLimits limits) Sets the limits setting.multithread(boolean multithread) Sets the multithread setting.removeMainArgs(boolean removeMainArgs) Sets the removeMainArgs setting.removeMethodThis(boolean removeMethodThis) Sets the removeMethodThis setting.Sets the source setting.Sets the stdin setting.Sets the typeStyle setting.
-
Method Details
-
source
Sets the source setting.- Parameters:
source- Submitted Java source text.- Returns:
- This builder.
-
stdin
Sets the stdin setting.- Parameters:
stdin- Guest standard input.- Returns:
- This builder.
-
format
Sets the format setting.- Parameters:
format- Output format.- Returns:
- This builder.
-
breakpoints
Sets and detaches the selected breakpoint specifications.- Parameters:
breakpoints- Text in the class contract's syntax; an empty effective selection uses the mode default.- Returns:
- This builder.
- Throws:
NullPointerException- If the list or one of its elements is null.
-
chronological
Sets the chronological setting.- Parameters:
chronological- Whether to capture selected locations chronologically; empty selects all lines.- Returns:
- This builder.
-
accumulate
Sets the accumulate setting.- Parameters:
accumulate- Whether to retain repeated selected breakpoint hits.- Returns:
- This builder.
-
multithread
Sets the multithread setting.- Parameters:
multithread- Whether to capture application threads; execution requires modern format and uses chronological capture with field-only inspection.- Returns:
- This builder.
-
removeMainArgs
Sets the removeMainArgs setting.- Parameters:
removeMainArgs- Whether to omit the main argument variable.- Returns:
- This builder.
-
inlineStrings
Selects string inlining for Python Tutor output; modern output ignores this setting.- Parameters:
inlineStrings- Whether to replace Python Tutor string references with literal strings.- Returns:
- This builder.
-
removeMethodThis
Sets the removeMethodThis setting.- Parameters:
removeMethodThis- Whether to omit receiver variables.- Returns:
- This builder.
-
typeStyle
Sets the typeStyle setting.- Parameters:
typeStyle- Type-label presentation.- Returns:
- This builder.
-
limits
Sets the limits setting.- Parameters:
limits- Resource budgets.- Returns:
- This builder.
-
inspection
Sets the inspection setting.- Parameters:
inspection- Guest inspection policy.- Returns:
- This builder.
-
build
Builds a request using the existing constructor's validation.- Returns:
- A new request.
- Throws:
NullPointerException- If a required value is null.
-