Class PomModifications.Replacement

java.lang.Object
org.technologybrewery.baton.util.pom.PomModifications.Modification
org.technologybrewery.baton.util.pom.PomModifications.Replacement
All Implemented Interfaces:
Comparable<PomModifications.Modification>
Enclosing class:
PomModifications

public static class PomModifications.Replacement extends PomModifications.Modification
Replaces the content between the start and end locations with the produced content.
  • Constructor Details

    • Replacement

      public Replacement(org.apache.maven.model.InputLocation start, org.apache.maven.model.InputLocation end, String content)
      Constructor for replacing content within a single line.
      Parameters:
      start - the location to insert the new content.
      end - the location to skip to, existing content between start and end will be deleted.
      content - the new content.
    • Replacement

      public Replacement(org.apache.maven.model.InputLocation start, org.apache.maven.model.InputLocation end, int indentLvl, UnaryOperator<String> contentProducer)
      Constructor for multi-line replacements.
      Parameters:
      start - the location to insert the new content.
      end - the location to skip to, existing content between start and end will be deleted.
      indentLvl - 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.
  • Method Details