Class PomModifications.Replacement

    • Constructor Detail

      • 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.