Class DefaultEditor

java.lang.Object
io.micronaut.gradle.docker.editor.DefaultEditor
All Implemented Interfaces:
Editor

public class DefaultEditor extends Object implements Editor
  • Constructor Details

  • Method Details

    • before

      public void before(String line, org.gradle.api.Action<? super Editor> action)
      Description copied from interface: Editor
      Restricts edition to lines before the given line.
      Specified by:
      before in interface Editor
      Parameters:
      line - the marker line
      action - the action to execute
    • after

      public void after(String line, org.gradle.api.Action<? super Editor> action)
      Description copied from interface: Editor
      Restricts edition to lines after the given line.
      Specified by:
      after in interface Editor
      Parameters:
      line - the marker line
      action - the action to execute
    • replace

      public void replace(String replacement)
      Description copied from interface: Editor
      Replaces lines matching the current lower and upper bounds with the provided replacement.
      Specified by:
      replace in interface Editor
      Parameters:
      replacement - the replacement
    • replace

      public void replace(String line, String replacement)
      Description copied from interface: Editor
      Replaces lines matching the current lower and upper bounds with the replacement, if they match the line pattern.
      Specified by:
      replace in interface Editor
      Parameters:
      line - the line pattern
      replacement - the replacement
    • replaceRegex

      public void replaceRegex(String regex, String replacement)
      Description copied from interface: Editor
      Replaces strings matching the current lower and upper bounds with the replacement, if they match the line pattern.
      Specified by:
      replaceRegex in interface Editor
      Parameters:
      regex - the regex to look for
      replacement - the replacement
    • insert

      public void insert(String... lines)
      Description copied from interface: Editor
      Inserts the provided lines after the current lower bound.
      Specified by:
      insert in interface Editor
      Parameters:
      lines - the lines to be inserted
    • getLines

      public List<String> getLines()