Class FingerprintingEditor

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

public class FingerprintingEditor extends Object implements Editor
An implementation of editor which computes a fingerprint for Gradle input snapshotting.
  • Constructor Summary

    Constructors
    Constructor
    Description
    FingerprintingEditor(org.gradle.api.model.ObjectFactory objects, List<String> fingerprint)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    after(String line, org.gradle.api.Action<? super Editor> action)
    Restricts edition to lines after the given line.
    void
    before(String line, org.gradle.api.Action<? super Editor> action)
    Restricts edition to lines before the given line.
     
    void
    insert(String... lines)
    Inserts the provided lines after the current lower bound.
    void
    replace(String replacement)
    Replaces lines matching the current lower and upper bounds with the provided replacement.
    void
    replace(String line, String replacement)
    Replaces lines matching the current lower and upper bounds with the replacement, if they match the line pattern.
    void
    replaceRegex(String regex, String replacement)
    Replaces strings matching the current lower and upper bounds with the replacement, if they match the line pattern.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • FingerprintingEditor

      @Inject public FingerprintingEditor(org.gradle.api.model.ObjectFactory objects, List<String> fingerprint)
  • 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
    • getFingerprint

      public List<String> getFingerprint()