Record Class CaptureTargetInsertionPlan

java.lang.Object
java.lang.Record
com.shaft.capture.generate.CaptureTargetInsertionPlan
Record Components:
targetSource - existing source file selected by the user
insertAfter - insertion anchor supplied by the user
imports - imports required by locator or action snippets
locatorFields - locator fields copied from generated source
actionSnippet - generated action lines for the target method
placement - human-readable placement guidance
anchorFound - whether the target source contains the supplied anchor
warnings - safe validation warnings

public record CaptureTargetInsertionPlan(Path targetSource, String insertAfter, List<String> imports, String locatorFields, String actionSnippet, String placement, boolean anchorFound, List<String> warnings) extends Record
Focused record-at-target insertion snippets derived from generated Capture source.
  • Constructor Details

    • CaptureTargetInsertionPlan

      public CaptureTargetInsertionPlan(Path targetSource, String insertAfter, List<String> imports, String locatorFields, String actionSnippet, String placement, boolean anchorFound, List<String> warnings)
      Creates an immutable insertion plan.
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • targetSource

      public Path targetSource()
      Returns the value of the targetSource record component.
      Returns:
      the value of the targetSource record component
    • insertAfter

      public String insertAfter()
      Returns the value of the insertAfter record component.
      Returns:
      the value of the insertAfter record component
    • imports

      public List<String> imports()
      Returns the value of the imports record component.
      Returns:
      the value of the imports record component
    • locatorFields

      public String locatorFields()
      Returns the value of the locatorFields record component.
      Returns:
      the value of the locatorFields record component
    • actionSnippet

      public String actionSnippet()
      Returns the value of the actionSnippet record component.
      Returns:
      the value of the actionSnippet record component
    • placement

      public String placement()
      Returns the value of the placement record component.
      Returns:
      the value of the placement record component
    • anchorFound

      public boolean anchorFound()
      Returns the value of the anchorFound record component.
      Returns:
      the value of the anchorFound record component
    • warnings

      public List<String> warnings()
      Returns the value of the warnings record component.
      Returns:
      the value of the warnings record component