public final class Pp2FormatResult extends Object
Pp2Formatter.format(...) call.
Carries the formatted SQL text, the overall outcome
(FormatStatus), the per-region rendering record
(Pp2FormatResult.Region), and the diagnostic events the engine emitted along the
way (FormatDiagnostic).
Built only by pp2 internals. Callers consume the immutable accessors:
getText(), getStatus(), getRegions(),
getDiagnostics(). The two list accessors return unmodifiable
views.
| Modifier and Type | Class and Description |
|---|---|
static class |
Pp2FormatResult.Region
Per-region rendering record.
|
| Constructor and Description |
|---|
Pp2FormatResult(String text,
FormatStatus status,
List<Pp2FormatResult.Region> regions,
List<FormatDiagnostic> diagnostics) |
| Modifier and Type | Method and Description |
|---|---|
List<FormatDiagnostic> |
getDiagnostics()
Unmodifiable view; never
null, may be empty. |
List<Pp2FormatResult.Region> |
getRegions()
Unmodifiable view; never
null, may be empty. |
FormatStatus |
getStatus() |
String |
getText() |
String |
toString() |
public Pp2FormatResult(String text, FormatStatus status, List<Pp2FormatResult.Region> regions, List<FormatDiagnostic> diagnostics)
public FormatStatus getStatus()
public List<Pp2FormatResult.Region> getRegions()
null, may be empty.public List<FormatDiagnostic> getDiagnostics()
null, may be empty.