Class SplicePlan
java.lang.Object
io.jenkins.plugins.configsplice.engine.SplicePlan
An ordered set of non-overlapping replacements to apply to one document (SRS section 10.1).
Edits are applied in descending start-offset order so that each splice leaves the offsets of every not-yet-applied edit valid. Overlap is rejected rather than resolved: two substitutions competing for the same source range means the user's intent is ambiguous, and guessing would silently discard one of them.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classCollects edits and enforces the non-overlap invariant when the plan is built.static final recordOne replacement. -
Method Summary
Modifier and TypeMethodDescriptionApplies every edit totext.static SplicePlan.Builderbuilder()edits()booleanisEmpty()
-
Method Details
-
builder
-
edits
-
isEmpty
public boolean isEmpty() -
applyTo
Applies every edit totext.The caller is responsible for having built the plan against this exact text; ranges are bounds-checked here so a mismatch fails loudly instead of producing a mangled file.
- Throws:
SpliceException
-