Class PomModifications.Insertion
java.lang.Object
org.technologybrewery.baton.util.pom.PomModifications.Modification
org.technologybrewery.baton.util.pom.PomModifications.Insertion
- All Implemented Interfaces:
Comparable<PomModifications.Modification>
- Enclosing class:
- PomModifications
Inserts the produced content at the specified start line and before the existing content on that line. Does NOT
support adding content to the middle of a line.
-
Constructor Summary
ConstructorsConstructorDescriptionInsertion(org.apache.maven.model.InputLocation start, int currentIndent, UnaryOperator<String> contentProducer) Constructor to insert content before the given start existing content on the given start index. -
Method Summary
Methods inherited from class org.technologybrewery.baton.util.pom.PomModifications.Modification
compareTo, getStart
-
Constructor Details
-
Insertion
public Insertion(org.apache.maven.model.InputLocation start, int currentIndent, UnaryOperator<String> contentProducer) Constructor to insert content before the given start existing content on the given start index.- Parameters:
start- the location to insert the content (before the existing content on that line).currentIndent- the indent level of the current content on the line.contentProducer- a function that produces the content to insert, given a one-level indent string.- See Also:
-
InputLocation
-
-
Method Details
-
apply
- Specified by:
applyin classPomModifications.Modification- Throws:
IOException
-
equals
- Overrides:
equalsin classPomModifications.Modification
-