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
public static class PomModifications.Insertion extends PomModifications.Modification
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
Constructors Constructor Description 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intapply(BufferedReader in, Writer out, String line)booleanequals(Object obj)-
Methods inherited from class org.technologybrewery.baton.util.pom.PomModifications.Modification
compareTo, getStart
-
-
-
-
Constructor Detail
-
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 Detail
-
apply
public int apply(BufferedReader in, Writer out, String line) throws IOException
- Specified by:
applyin classPomModifications.Modification- Throws:
IOException
-
equals
public boolean equals(Object obj)
- Overrides:
equalsin classPomModifications.Modification
-
-